Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(642)

Side by Side Diff: chrome/browser/ui/cocoa/browser_window_cocoa.mm

Issue 1579813002: PoC: Using the toolkit-views fullscreen access bubble on Mac (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Refine Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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"
11 #include "base/message_loop/message_loop.h" 11 #include "base/message_loop/message_loop.h"
12 #include "base/prefs/pref_service.h" 12 #include "base/prefs/pref_service.h"
13 #include "base/strings/string_util.h" 13 #include "base/strings/string_util.h"
14 #include "base/strings/sys_string_conversions.h" 14 #include "base/strings/sys_string_conversions.h"
15 #include "chrome/app/chrome_command_ids.h" 15 #include "chrome/app/chrome_command_ids.h"
16 #include "chrome/browser/chrome_notification_types.h" 16 #include "chrome/browser/chrome_notification_types.h"
17 #include "chrome/browser/download/download_shelf.h" 17 #include "chrome/browser/download/download_shelf.h"
18 #include "chrome/browser/extensions/extension_util.h" 18 #include "chrome/browser/extensions/extension_util.h"
19 #include "chrome/browser/extensions/tab_helper.h" 19 #include "chrome/browser/extensions/tab_helper.h"
20 #include "chrome/browser/fullscreen.h" 20 #include "chrome/browser/fullscreen.h"
21 #include "chrome/browser/profiles/profile.h" 21 #include "chrome/browser/profiles/profile.h"
22 #include "chrome/browser/shell_integration.h" 22 #include "chrome/browser/shell_integration.h"
23 #include "chrome/browser/signin/chrome_signin_helper.h" 23 #include "chrome/browser/signin/chrome_signin_helper.h"
24 #include "chrome/browser/translate/chrome_translate_client.h" 24 #include "chrome/browser/translate/chrome_translate_client.h"
25 #include "chrome/browser/ui/browser.h" 25 #include "chrome/browser/ui/browser.h"
26 #include "chrome/browser/ui/browser_command_controller.h" 26 #include "chrome/browser/ui/browser_command_controller.h"
27 #include "chrome/browser/ui/browser_commands_mac.h" 27 #include "chrome/browser/ui/browser_commands_mac.h"
28 #include "chrome/browser/ui/browser_list.h" 28 #include "chrome/browser/ui/browser_list.h"
29 #include "chrome/browser/ui/browser_window_state.h" 29 #include "chrome/browser/ui/browser_window_state.h"
30 #include "chrome/browser/ui/cocoa/accelerators_cocoa.h"
30 #import "chrome/browser/ui/cocoa/autofill/save_card_bubble_view_bridge.h" 31 #import "chrome/browser/ui/cocoa/autofill/save_card_bubble_view_bridge.h"
31 #import "chrome/browser/ui/cocoa/browser/edit_search_engine_cocoa_controller.h" 32 #import "chrome/browser/ui/cocoa/browser/edit_search_engine_cocoa_controller.h"
32 #import "chrome/browser/ui/cocoa/browser_window_controller.h" 33 #import "chrome/browser/ui/cocoa/browser_window_controller.h"
33 #import "chrome/browser/ui/cocoa/browser_window_utils.h" 34 #import "chrome/browser/ui/cocoa/browser_window_utils.h"
34 #import "chrome/browser/ui/cocoa/chrome_event_processing_window.h" 35 #import "chrome/browser/ui/cocoa/chrome_event_processing_window.h"
35 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_sheet_con troller.h" 36 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_sheet_con troller.h"
36 #import "chrome/browser/ui/cocoa/download/download_shelf_controller.h" 37 #import "chrome/browser/ui/cocoa/download/download_shelf_controller.h"
37 #import "chrome/browser/ui/cocoa/extensions/browser_actions_controller.h" 38 #import "chrome/browser/ui/cocoa/extensions/browser_actions_controller.h"
38 #include "chrome/browser/ui/cocoa/find_bar/find_bar_bridge.h" 39 #include "chrome/browser/ui/cocoa/find_bar/find_bar_bridge.h"
39 #import "chrome/browser/ui/cocoa/info_bubble_view.h" 40 #import "chrome/browser/ui/cocoa/info_bubble_view.h"
(...skipping 854 matching lines...) Expand 10 before | Expand all | Expand 10 after
894 void BrowserWindowCocoa::UnhideDownloadShelf() { 895 void BrowserWindowCocoa::UnhideDownloadShelf() {
895 GetDownloadShelf()->Unhide(); 896 GetDownloadShelf()->Unhide();
896 } 897 }
897 898
898 void BrowserWindowCocoa::HideDownloadShelf() { 899 void BrowserWindowCocoa::HideDownloadShelf() {
899 GetDownloadShelf()->Hide(); 900 GetDownloadShelf()->Hide();
900 StatusBubble* statusBubble = GetStatusBubble(); 901 StatusBubble* statusBubble = GetStatusBubble();
901 if (statusBubble) 902 if (statusBubble)
902 statusBubble->Hide(); 903 statusBubble->Hide();
903 } 904 }
905
906 ExclusiveAccessManager* BrowserWindowCocoa::GetExclusiveAccessManager() {
907 return browser_->exclusive_access_manager();
908 }
909
910 gfx::NativeView BrowserWindowCocoa::GetNativeView() const {
911 return [window() contentView];
912 }
913
914 bool BrowserWindowCocoa::IsParentActive() const {
915 return IsActive();
916 }
917
918 bool BrowserWindowCocoa::GetAccelerator2(int cmd_id,
919 ui::Accelerator* accelerator) const {
920 *accelerator =
921 *AcceleratorsCocoa::GetInstance()->GetAcceleratorForCommand(cmd_id);
922 return true;
923 }
924
925 gfx::Point BrowserWindowCocoa::GetCursorScreenPoint() {
926 return gfx::Point();
927 }
928
929 bool BrowserWindowCocoa::HitTestPoint(const gfx::Point& point) const {
930 return true;
931 }
932
933 gfx::Rect BrowserWindowCocoa::GetClientAreaBoundsInScreen() const {
934 return GetBounds();
935 }
936
937 bool BrowserWindowCocoa::IsImmersiveModeEnabled() {
938 return false;
939 }
940
941 gfx::Rect BrowserWindowCocoa::GetTopContainerBoundsInScreen() {
942 return GetBounds();
943 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_cocoa.h ('k') | chrome/browser/ui/cocoa/browser_window_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698