| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_VIEWS_TOOLBAR_BROWSER_ACTION_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_TOOLBAR_BROWSER_ACTION_VIEW_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_TOOLBAR_BROWSER_ACTION_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_TOOLBAR_BROWSER_ACTION_VIEW_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "chrome/browser/extensions/extension_action_icon_factory.h" | 10 #include "chrome/browser/extensions/extension_action_icon_factory.h" |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 | 224 |
| 225 // The object that will be used to get the browser action icon for us. | 225 // The object that will be used to get the browser action icon for us. |
| 226 // It may load the icon asynchronously (in which case the initial icon | 226 // It may load the icon asynchronously (in which case the initial icon |
| 227 // returned by the factory will be transparent), so we have to observe it for | 227 // returned by the factory will be transparent), so we have to observe it for |
| 228 // updates to the icon. | 228 // updates to the icon. |
| 229 ExtensionActionIconFactory icon_factory_; | 229 ExtensionActionIconFactory icon_factory_; |
| 230 | 230 |
| 231 // Delegate that usually represents a container for BrowserActionView. | 231 // Delegate that usually represents a container for BrowserActionView. |
| 232 BrowserActionView::Delegate* delegate_; | 232 BrowserActionView::Delegate* delegate_; |
| 233 | 233 |
| 234 // The context menu. This member is non-NULL only when the menu is shown. | |
| 235 views::MenuItemView* context_menu_; | |
| 236 | |
| 237 // Used to make sure MaybeRegisterExtensionCommand() is called only once | 234 // Used to make sure MaybeRegisterExtensionCommand() is called only once |
| 238 // from ViewHierarchyChanged(). | 235 // from ViewHierarchyChanged(). |
| 239 bool called_registered_extension_command_; | 236 bool called_registered_extension_command_; |
| 240 | 237 |
| 241 content::NotificationRegistrar registrar_; | 238 content::NotificationRegistrar registrar_; |
| 242 | 239 |
| 243 // The extension key binding accelerator this browser action is listening for | 240 // The extension key binding accelerator this browser action is listening for |
| 244 // (to show the popup). | 241 // (to show the popup). |
| 245 scoped_ptr<ui::Accelerator> keybinding_; | 242 scoped_ptr<ui::Accelerator> keybinding_; |
| 246 | 243 |
| 247 // Responsible for running the menu. | 244 // Responsible for running the menu. |
| 248 scoped_ptr<views::MenuRunner> menu_runner_; | 245 scoped_ptr<views::MenuRunner> menu_runner_; |
| 249 | 246 |
| 250 // The observer that we need to notify when the icon of the button has been | 247 // The observer that we need to notify when the icon of the button has been |
| 251 // updated. | 248 // updated. |
| 252 IconObserver* icon_observer_; | 249 IconObserver* icon_observer_; |
| 253 | 250 |
| 254 friend class base::DeleteHelper<BrowserActionButton>; | 251 friend class base::DeleteHelper<BrowserActionButton>; |
| 255 | 252 |
| 256 DISALLOW_COPY_AND_ASSIGN(BrowserActionButton); | 253 DISALLOW_COPY_AND_ASSIGN(BrowserActionButton); |
| 257 }; | 254 }; |
| 258 | 255 |
| 259 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_BROWSER_ACTION_VIEW_H_ | 256 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_BROWSER_ACTION_VIEW_H_ |
| OLD | NEW |