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

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

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 #ifndef CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_COCOA_H_ 5 #ifndef CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_COCOA_H_
6 #define CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_COCOA_H_ 6 #define CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_COCOA_H_
7 7
8 #include "base/mac/scoped_nsobject.h" 8 #include "base/mac/scoped_nsobject.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "chrome/browser/extensions/extension_keybinding_registry.h" 10 #include "chrome/browser/extensions/extension_keybinding_registry.h"
11 #include "chrome/browser/signin/chrome_signin_helper.h" 11 #include "chrome/browser/signin/chrome_signin_helper.h"
12 #include "chrome/browser/ssl/security_state_model.h" 12 #include "chrome/browser/ssl/security_state_model.h"
13 #include "chrome/browser/ui/browser_window.h" 13 #include "chrome/browser/ui/browser_window.h"
14 #include "chrome/browser/ui/exclusive_access/exclusive_access_context.h" 14 #include "chrome/browser/ui/exclusive_access/exclusive_access_context.h"
15 #include "chrome/browser/ui/search/search_model_observer.h" 15 #include "chrome/browser/ui/search/search_model_observer.h"
16 #include "chrome/browser/ui/tabs/tab_utils.h" 16 #include "chrome/browser/ui/tabs/tab_utils.h"
17 #include "chrome/browser/ui/views/exclusive_access_bubble_views_context.h"
17 #include "components/bookmarks/browser/bookmark_model.h" 18 #include "components/bookmarks/browser/bookmark_model.h"
18 #include "ui/base/ui_base_types.h" 19 #include "ui/base/ui_base_types.h"
19 20
20 class Browser; 21 class Browser;
21 @class BrowserWindowController; 22 @class BrowserWindowController;
22 @class FindBarCocoaController; 23 @class FindBarCocoaController;
23 @class NSEvent; 24 @class NSEvent;
24 @class NSMenu; 25 @class NSMenu;
25 @class NSWindow; 26 @class NSWindow;
26 27
27 namespace extensions { 28 namespace extensions {
28 class ActiveTabPermissionGranter; 29 class ActiveTabPermissionGranter;
29 class Command; 30 class Command;
30 class Extension; 31 class Extension;
31 } 32 }
32 33
33 // An implementation of BrowserWindow for Cocoa. Bridges between C++ and 34 // An implementation of BrowserWindow for Cocoa. Bridges between C++ and
34 // the Cocoa NSWindow. Cross-platform code will interact with this object when 35 // the Cocoa NSWindow. Cross-platform code will interact with this object when
35 // it needs to manipulate the window. 36 // it needs to manipulate the window.
36 37
37 class BrowserWindowCocoa 38 class BrowserWindowCocoa
38 : public BrowserWindow, 39 : public BrowserWindow,
39 public ExclusiveAccessContext, 40 public ExclusiveAccessContext,
41 public ExclusiveAccessBubbleViewsContext,
40 public extensions::ExtensionKeybindingRegistry::Delegate, 42 public extensions::ExtensionKeybindingRegistry::Delegate,
41 public SearchModelObserver { 43 public SearchModelObserver {
42 public: 44 public:
43 BrowserWindowCocoa(Browser* browser, 45 BrowserWindowCocoa(Browser* browser,
44 BrowserWindowController* controller); 46 BrowserWindowController* controller);
45 ~BrowserWindowCocoa() override; 47 ~BrowserWindowCocoa() override;
46 48
47 // Overridden from BrowserWindow 49 // Overridden from BrowserWindow
48 void Show() override; 50 void Show() override;
49 void ShowInactive() override; 51 void ShowInactive() override;
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 void ExecuteExtensionCommand(const extensions::Extension* extension, 170 void ExecuteExtensionCommand(const extensions::Extension* extension,
169 const extensions::Command& command) override; 171 const extensions::Command& command) override;
170 ExclusiveAccessContext* GetExclusiveAccessContext() override; 172 ExclusiveAccessContext* GetExclusiveAccessContext() override;
171 173
172 // ExclusiveAccessContext interface 174 // ExclusiveAccessContext interface
173 Profile* GetProfile() override; 175 Profile* GetProfile() override;
174 content::WebContents* GetActiveWebContents() override; 176 content::WebContents* GetActiveWebContents() override;
175 void UnhideDownloadShelf() override; 177 void UnhideDownloadShelf() override;
176 void HideDownloadShelf() override; 178 void HideDownloadShelf() override;
177 179
180 // Overridden from ExclusiveAccessBubbleViewsContext:
181 ExclusiveAccessManager* GetExclusiveAccessManager() override;
182 gfx::NativeView GetNativeView() const override;
183 bool IsParentActive() const override;
184 bool GetAccelerator2(int cmd_id, ui::Accelerator* accelerator) const override;
185 gfx::Point GetCursorScreenPoint() override;
186 bool HitTestPoint(const gfx::Point& point) const override;
187 gfx::Rect GetClientAreaBoundsInScreen() const override;
188 bool IsImmersiveModeEnabled() override;
189 gfx::Rect GetTopContainerBoundsInScreen() override;
190
178 // Overridden from ExtensionKeybindingRegistry::Delegate: 191 // Overridden from ExtensionKeybindingRegistry::Delegate:
179 extensions::ActiveTabPermissionGranter* GetActiveTabPermissionGranter() 192 extensions::ActiveTabPermissionGranter* GetActiveTabPermissionGranter()
180 override; 193 override;
181 194
182 // Overridden from SearchModelObserver: 195 // Overridden from SearchModelObserver:
183 void ModelChanged(const SearchModel::State& old_state, 196 void ModelChanged(const SearchModel::State& old_state,
184 const SearchModel::State& new_state) override; 197 const SearchModel::State& new_state) override;
185 198
186 // Adds the given FindBar cocoa controller to this browser window. 199 // Adds the given FindBar cocoa controller to this browser window.
187 void AddFindBar(FindBarCocoaController* find_bar_cocoa_controller); 200 void AddFindBar(FindBarCocoaController* find_bar_cocoa_controller);
(...skipping 24 matching lines...) Expand all
212 ui::WindowShowState initial_show_state_; 225 ui::WindowShowState initial_show_state_;
213 NSInteger attention_request_id_; // identifier from requestUserAttention 226 NSInteger attention_request_id_; // identifier from requestUserAttention
214 227
215 // Preserves window media state to show appropriate icon in the window title 228 // Preserves window media state to show appropriate icon in the window title
216 // which can be audio playing, muting or none (determined by media state of 229 // which can be audio playing, muting or none (determined by media state of
217 // tabs. 230 // tabs.
218 TabMediaState media_state_; 231 TabMediaState media_state_;
219 }; 232 };
220 233
221 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_COCOA_H_ 234 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_COCOA_H_
OLDNEW
« no previous file with comments | « chrome/app/nibs/ExclusiveAccessBubble.xib ('k') | chrome/browser/ui/cocoa/browser_window_cocoa.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698