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" |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 virtual void ShowAvatarBubbleFromAvatarButton(AvatarBubbleMode mode, | 154 virtual void ShowAvatarBubbleFromAvatarButton(AvatarBubbleMode mode, |
155 const signin::ManageAccountsParams& manage_accounts_params) OVERRIDE; | 155 const signin::ManageAccountsParams& manage_accounts_params) OVERRIDE; |
156 virtual void ShowPasswordGenerationBubble( | 156 virtual void ShowPasswordGenerationBubble( |
157 const gfx::Rect& rect, | 157 const gfx::Rect& rect, |
158 const autofill::PasswordForm& form, | 158 const autofill::PasswordForm& form, |
159 autofill::PasswordGenerator* password_generator) OVERRIDE; | 159 autofill::PasswordGenerator* password_generator) OVERRIDE; |
160 virtual int GetRenderViewHeightInsetWithDetachedBookmarkBar() OVERRIDE; | 160 virtual int GetRenderViewHeightInsetWithDetachedBookmarkBar() OVERRIDE; |
161 virtual void ExecuteExtensionCommand( | 161 virtual void ExecuteExtensionCommand( |
162 const extensions::Extension* extension, | 162 const extensions::Extension* extension, |
163 const extensions::Command& command) OVERRIDE; | 163 const extensions::Command& command) OVERRIDE; |
| 164 virtual bool IsExtensionCommandRegistered( |
| 165 const ui::Accelerator& accelerator) OVERRIDE; |
164 | 166 |
165 // Overridden from ExtensionKeybindingRegistry::Delegate: | 167 // Overridden from ExtensionKeybindingRegistry::Delegate: |
166 virtual extensions::ActiveTabPermissionGranter* | 168 virtual extensions::ActiveTabPermissionGranter* |
167 GetActiveTabPermissionGranter() OVERRIDE; | 169 GetActiveTabPermissionGranter() OVERRIDE; |
168 | 170 |
169 // Overridden from SearchModelObserver: | 171 // Overridden from SearchModelObserver: |
170 virtual void ModelChanged(const SearchModel::State& old_state, | 172 virtual void ModelChanged(const SearchModel::State& old_state, |
171 const SearchModel::State& new_state) OVERRIDE; | 173 const SearchModel::State& new_state) OVERRIDE; |
172 | 174 |
173 // Adds the given FindBar cocoa controller to this browser window. | 175 // Adds the given FindBar cocoa controller to this browser window. |
174 void AddFindBar(FindBarCocoaController* find_bar_cocoa_controller); | 176 void AddFindBar(FindBarCocoaController* find_bar_cocoa_controller); |
175 | 177 |
176 // Returns the cocoa-world BrowserWindowController | 178 // Returns the cocoa-world BrowserWindowController |
177 BrowserWindowController* cocoa_controller() { return controller_; } | 179 BrowserWindowController* cocoa_controller() { return controller_; } |
178 | 180 |
179 protected: | 181 protected: |
180 virtual void DestroyBrowser() OVERRIDE; | 182 virtual void DestroyBrowser() OVERRIDE; |
181 | 183 |
182 private: | 184 private: |
183 NSWindow* window() const; // Accessor for the (current) |NSWindow|. | 185 NSWindow* window() const; // Accessor for the (current) |NSWindow|. |
184 | 186 |
185 Browser* browser_; // weak, owned by controller | 187 Browser* browser_; // weak, owned by controller |
186 BrowserWindowController* controller_; // weak, owns us | 188 BrowserWindowController* controller_; // weak, owns us |
187 base::scoped_nsobject<NSString> pending_window_title_; | 189 base::scoped_nsobject<NSString> pending_window_title_; |
188 ui::WindowShowState initial_show_state_; | 190 ui::WindowShowState initial_show_state_; |
189 NSInteger attention_request_id_; // identifier from requestUserAttention | 191 NSInteger attention_request_id_; // identifier from requestUserAttention |
190 }; | 192 }; |
191 | 193 |
192 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_COCOA_H_ | 194 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_WINDOW_COCOA_H_ |
OLD | NEW |