| 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 #import "base/mac/sdk_forward_declarations.h" | 10 #import "base/mac/sdk_forward_declarations.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 #import "chrome/browser/ui/cocoa/browser_window_utils.h" | 33 #import "chrome/browser/ui/cocoa/browser_window_utils.h" |
| 34 #import "chrome/browser/ui/cocoa/chrome_event_processing_window.h" | 34 #import "chrome/browser/ui/cocoa/chrome_event_processing_window.h" |
| 35 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_sheet_con
troller.h" | 35 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_sheet_con
troller.h" |
| 36 #import "chrome/browser/ui/cocoa/download/download_shelf_controller.h" | 36 #import "chrome/browser/ui/cocoa/download/download_shelf_controller.h" |
| 37 #import "chrome/browser/ui/cocoa/extensions/browser_actions_controller.h" | 37 #import "chrome/browser/ui/cocoa/extensions/browser_actions_controller.h" |
| 38 #include "chrome/browser/ui/cocoa/find_bar/find_bar_bridge.h" | 38 #include "chrome/browser/ui/cocoa/find_bar/find_bar_bridge.h" |
| 39 #import "chrome/browser/ui/cocoa/info_bubble_view.h" | 39 #import "chrome/browser/ui/cocoa/info_bubble_view.h" |
| 40 #include "chrome/browser/ui/cocoa/key_equivalent_constants.h" | 40 #include "chrome/browser/ui/cocoa/key_equivalent_constants.h" |
| 41 #import "chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h" | 41 #import "chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h" |
| 42 #import "chrome/browser/ui/cocoa/nsmenuitem_additions.h" | 42 #import "chrome/browser/ui/cocoa/nsmenuitem_additions.h" |
| 43 #import "chrome/browser/ui/cocoa/page_info/website_settings_bubble_controller.h" | 43 #import "chrome/browser/ui/cocoa/page_info/page_info_bubble_controller.h" |
| 44 #import "chrome/browser/ui/cocoa/profiles/avatar_base_controller.h" | 44 #import "chrome/browser/ui/cocoa/profiles/avatar_base_controller.h" |
| 45 #include "chrome/browser/ui/cocoa/restart_browser.h" | 45 #include "chrome/browser/ui/cocoa/restart_browser.h" |
| 46 #include "chrome/browser/ui/cocoa/status_bubble_mac.h" | 46 #include "chrome/browser/ui/cocoa/status_bubble_mac.h" |
| 47 #include "chrome/browser/ui/cocoa/task_manager_mac.h" | 47 #include "chrome/browser/ui/cocoa/task_manager_mac.h" |
| 48 #import "chrome/browser/ui/cocoa/toolbar/toolbar_controller.h" | 48 #import "chrome/browser/ui/cocoa/toolbar/toolbar_controller.h" |
| 49 #include "chrome/browser/ui/exclusive_access/exclusive_access_context.h" | 49 #include "chrome/browser/ui/exclusive_access/exclusive_access_context.h" |
| 50 #include "chrome/browser/ui/profile_chooser_constants.h" | 50 #include "chrome/browser/ui/profile_chooser_constants.h" |
| 51 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 51 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 52 #include "chrome/browser/web_applications/web_app.h" | 52 #include "chrome/browser/web_applications/web_app.h" |
| 53 #include "chrome/common/chrome_switches.h" | 53 #include "chrome/common/chrome_switches.h" |
| (...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 679 if (locationBar) { | 679 if (locationBar) { |
| 680 locationBar->OnThemeChanged(); | 680 locationBar->OnThemeChanged(); |
| 681 } | 681 } |
| 682 } | 682 } |
| 683 | 683 |
| 684 void BrowserWindowCocoa::ShowWebsiteSettings( | 684 void BrowserWindowCocoa::ShowWebsiteSettings( |
| 685 Profile* profile, | 685 Profile* profile, |
| 686 content::WebContents* web_contents, | 686 content::WebContents* web_contents, |
| 687 const GURL& virtual_url, | 687 const GURL& virtual_url, |
| 688 const security_state::SecurityInfo& security_info) { | 688 const security_state::SecurityInfo& security_info) { |
| 689 WebsiteSettingsUIBridge::Show(window(), profile, web_contents, virtual_url, | 689 PageInfoUIBridge::Show(window(), profile, web_contents, virtual_url, |
| 690 security_info); | 690 security_info); |
| 691 } | 691 } |
| 692 | 692 |
| 693 void BrowserWindowCocoa::ShowAppMenu() { | 693 void BrowserWindowCocoa::ShowAppMenu() { |
| 694 // No-op. Mac doesn't support showing the menus via alt keys. | 694 // No-op. Mac doesn't support showing the menus via alt keys. |
| 695 } | 695 } |
| 696 | 696 |
| 697 bool BrowserWindowCocoa::PreHandleKeyboardEvent( | 697 bool BrowserWindowCocoa::PreHandleKeyboardEvent( |
| 698 const NativeWebKeyboardEvent& event, bool* is_keyboard_shortcut) { | 698 const NativeWebKeyboardEvent& event, bool* is_keyboard_shortcut) { |
| 699 // Handle ESC to dismiss permission bubbles, but still forward it | 699 // Handle ESC to dismiss permission bubbles, but still forward it |
| 700 // to the window afterwards. | 700 // to the window afterwards. |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 838 ExclusiveAccessContext* BrowserWindowCocoa::GetExclusiveAccessContext() { | 838 ExclusiveAccessContext* BrowserWindowCocoa::GetExclusiveAccessContext() { |
| 839 return [controller_ exclusiveAccessController]; | 839 return [controller_ exclusiveAccessController]; |
| 840 } | 840 } |
| 841 | 841 |
| 842 void BrowserWindowCocoa::ShowImeWarningBubble( | 842 void BrowserWindowCocoa::ShowImeWarningBubble( |
| 843 const extensions::Extension* extension, | 843 const extensions::Extension* extension, |
| 844 const base::Callback<void(ImeWarningBubblePermissionStatus status)>& | 844 const base::Callback<void(ImeWarningBubblePermissionStatus status)>& |
| 845 callback) { | 845 callback) { |
| 846 NOTREACHED() << "The IME warning bubble is unsupported on this platform."; | 846 NOTREACHED() << "The IME warning bubble is unsupported on this platform."; |
| 847 } | 847 } |
| OLD | NEW |