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 #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/ui/browser_window.h" | 11 #include "chrome/browser/ui/browser_window.h" |
12 #include "chrome/browser/ui/search/search_model_observer.h" | 12 #include "chrome/browser/ui/search/search_model_observer.h" |
13 #include "components/bookmarks/core/browser/bookmark_model.h" | 13 #include "components/bookmarks/core/browser/bookmark_model.h" |
14 #include "ui/base/ui_base_types.h" | 14 #include "ui/base/ui_base_types.h" |
15 | 15 |
16 class Browser; | 16 class Browser; |
17 @class BrowserWindowController; | 17 @class BrowserWindowController; |
18 @class FindBarCocoaController; | 18 @class FindBarCocoaController; |
19 @class NSEvent; | 19 @class NSEvent; |
20 @class NSMenu; | 20 @class NSMenu; |
21 @class NSWindow; | 21 @class NSWindow; |
22 | 22 |
23 namespace extensions { | 23 namespace extensions { |
24 class ActiveTabPermissionGranter; | 24 class ActiveTabPermissionGranter; |
25 class Command; | 25 class Command; |
26 class Extension; | 26 class Extension; |
27 } | 27 } |
28 | 28 |
| 29 namespace signin { |
| 30 enum GAIA_SERVICE_TYPE; |
| 31 } |
| 32 |
29 // An implementation of BrowserWindow for Cocoa. Bridges between C++ and | 33 // An implementation of BrowserWindow for Cocoa. Bridges between C++ and |
30 // the Cocoa NSWindow. Cross-platform code will interact with this object when | 34 // the Cocoa NSWindow. Cross-platform code will interact with this object when |
31 // it needs to manipulate the window. | 35 // it needs to manipulate the window. |
32 | 36 |
33 class BrowserWindowCocoa : | 37 class BrowserWindowCocoa : |
34 public BrowserWindow, | 38 public BrowserWindow, |
35 public extensions::ExtensionKeybindingRegistry::Delegate, | 39 public extensions::ExtensionKeybindingRegistry::Delegate, |
36 public SearchModelObserver { | 40 public SearchModelObserver { |
37 public: | 41 public: |
38 BrowserWindowCocoa(Browser* browser, | 42 BrowserWindowCocoa(Browser* browser, |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 virtual void EnterFullscreenWithChrome() OVERRIDE; | 145 virtual void EnterFullscreenWithChrome() OVERRIDE; |
142 virtual bool IsFullscreenWithChrome() OVERRIDE; | 146 virtual bool IsFullscreenWithChrome() OVERRIDE; |
143 virtual bool IsFullscreenWithoutChrome() OVERRIDE; | 147 virtual bool IsFullscreenWithoutChrome() OVERRIDE; |
144 virtual WindowOpenDisposition GetDispositionForPopupBounds( | 148 virtual WindowOpenDisposition GetDispositionForPopupBounds( |
145 const gfx::Rect& bounds) OVERRIDE; | 149 const gfx::Rect& bounds) OVERRIDE; |
146 virtual FindBar* CreateFindBar() OVERRIDE; | 150 virtual FindBar* CreateFindBar() OVERRIDE; |
147 virtual web_modal::WebContentsModalDialogHost* | 151 virtual web_modal::WebContentsModalDialogHost* |
148 GetWebContentsModalDialogHost() OVERRIDE; | 152 GetWebContentsModalDialogHost() OVERRIDE; |
149 virtual void ShowAvatarBubble(content::WebContents* web_contents, | 153 virtual void ShowAvatarBubble(content::WebContents* web_contents, |
150 const gfx::Rect& rect) OVERRIDE; | 154 const gfx::Rect& rect) OVERRIDE; |
151 virtual void ShowAvatarBubbleFromAvatarButton(AvatarBubbleMode mode) OVERRIDE; | 155 virtual void ShowAvatarBubbleFromAvatarButton(AvatarBubbleMode mode, |
| 156 signin::GAIA_SERVICE_TYPE service_type) OVERRIDE; |
152 virtual void ShowPasswordGenerationBubble( | 157 virtual void ShowPasswordGenerationBubble( |
153 const gfx::Rect& rect, | 158 const gfx::Rect& rect, |
154 const autofill::PasswordForm& form, | 159 const autofill::PasswordForm& form, |
155 autofill::PasswordGenerator* password_generator) OVERRIDE; | 160 autofill::PasswordGenerator* password_generator) OVERRIDE; |
156 virtual int GetRenderViewHeightInsetWithDetachedBookmarkBar() OVERRIDE; | 161 virtual int GetRenderViewHeightInsetWithDetachedBookmarkBar() OVERRIDE; |
157 virtual void ExecuteExtensionCommand( | 162 virtual void ExecuteExtensionCommand( |
158 const extensions::Extension* extension, | 163 const extensions::Extension* extension, |
159 const extensions::Command& command) OVERRIDE; | 164 const extensions::Command& command) OVERRIDE; |
160 virtual void ShowPageActionPopup( | 165 virtual void ShowPageActionPopup( |
161 const extensions::Extension* extension) OVERRIDE; | 166 const extensions::Extension* extension) OVERRIDE; |
(...skipping 21 matching lines...) Expand all Loading... |
183 NSWindow* window() const; // Accessor for the (current) |NSWindow|. | 188 NSWindow* window() const; // Accessor for the (current) |NSWindow|. |
184 | 189 |
185 Browser* browser_; // weak, owned by controller | 190 Browser* browser_; // weak, owned by controller |
186 BrowserWindowController* controller_; // weak, owns us | 191 BrowserWindowController* controller_; // weak, owns us |
187 base::scoped_nsobject<NSString> pending_window_title_; | 192 base::scoped_nsobject<NSString> pending_window_title_; |
188 ui::WindowShowState initial_show_state_; | 193 ui::WindowShowState initial_show_state_; |
189 NSInteger attention_request_id_; // identifier from requestUserAttention | 194 NSInteger attention_request_id_; // identifier from requestUserAttention |
190 }; | 195 }; |
191 | 196 |
192 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_COCOA_H_ | 197 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_COCOA_H_ |
OLD | NEW |