| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/ui/cocoa/browser_window_cocoa.h" | 5 #include "chrome/browser/ui/cocoa/browser_window_cocoa.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/mac/mac_util.h" | 10 #include "base/mac/mac_util.h" |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 49 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 50 #include "chrome/browser/web_applications/web_app.h" | 50 #include "chrome/browser/web_applications/web_app.h" |
| 51 #include "chrome/common/chrome_switches.h" | 51 #include "chrome/common/chrome_switches.h" |
| 52 #include "chrome/common/pref_names.h" | 52 #include "chrome/common/pref_names.h" |
| 53 #include "components/autofill/core/common/password_form.h" | 53 #include "components/autofill/core/common/password_form.h" |
| 54 #include "components/translate/core/browser/language_state.h" | 54 #include "components/translate/core/browser/language_state.h" |
| 55 #include "content/public/browser/native_web_keyboard_event.h" | 55 #include "content/public/browser/native_web_keyboard_event.h" |
| 56 #include "content/public/browser/notification_details.h" | 56 #include "content/public/browser/notification_details.h" |
| 57 #include "content/public/browser/notification_source.h" | 57 #include "content/public/browser/notification_source.h" |
| 58 #include "content/public/browser/web_contents.h" | 58 #include "content/public/browser/web_contents.h" |
| 59 #include "ui/base/accelerators/accelerator.h" |
| 59 #include "ui/base/l10n/l10n_util_mac.h" | 60 #include "ui/base/l10n/l10n_util_mac.h" |
| 60 #include "ui/gfx/rect.h" | 61 #include "ui/gfx/rect.h" |
| 61 | 62 |
| 62 #if defined(ENABLE_ONE_CLICK_SIGNIN) | 63 #if defined(ENABLE_ONE_CLICK_SIGNIN) |
| 63 #import "chrome/browser/ui/cocoa/one_click_signin_bubble_controller.h" | 64 #import "chrome/browser/ui/cocoa/one_click_signin_bubble_controller.h" |
| 64 #import "chrome/browser/ui/cocoa/one_click_signin_dialog_controller.h" | 65 #import "chrome/browser/ui/cocoa/one_click_signin_dialog_controller.h" |
| 65 #endif | 66 #endif |
| 66 | 67 |
| 67 using content::NativeWebKeyboardEvent; | 68 using content::NativeWebKeyboardEvent; |
| 68 using content::SSLStatus; | 69 using content::SSLStatus; |
| (...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 719 if (browser_->bookmark_bar_state() != BookmarkBar::DETACHED) | 720 if (browser_->bookmark_bar_state() != BookmarkBar::DETACHED) |
| 720 return 0; | 721 return 0; |
| 721 return 40; | 722 return 40; |
| 722 } | 723 } |
| 723 | 724 |
| 724 void BrowserWindowCocoa::ExecuteExtensionCommand( | 725 void BrowserWindowCocoa::ExecuteExtensionCommand( |
| 725 const extensions::Extension* extension, | 726 const extensions::Extension* extension, |
| 726 const extensions::Command& command) { | 727 const extensions::Command& command) { |
| 727 [cocoa_controller() executeExtensionCommand:extension->id() command:command]; | 728 [cocoa_controller() executeExtensionCommand:extension->id() command:command]; |
| 728 } | 729 } |
| 730 |
| 731 bool BrowserWindowCocoa::IsExtensionCommandRegistered( |
| 732 const ui::Accelerator& accelerator) { |
| 733 return [cocoa_controller() |
| 734 isExtensionCommandRegisteredForAccelerator:accelerator]; |
| 735 } |
| OLD | NEW |