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_VIEWS_BROWSER_ACTION_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_BROWSER_ACTION_VIEW_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_BROWSER_ACTION_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_BROWSER_ACTION_VIEW_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 | 91 |
92 protected: | 92 protected: |
93 // Overridden from views::View: | 93 // Overridden from views::View: |
94 virtual void ViewHierarchyChanged(bool is_add, | 94 virtual void ViewHierarchyChanged(bool is_add, |
95 View* parent, | 95 View* parent, |
96 View* child) OVERRIDE; | 96 View* child) OVERRIDE; |
97 | 97 |
98 private: | 98 private: |
99 virtual ~BrowserActionButton(); | 99 virtual ~BrowserActionButton(); |
100 | 100 |
| 101 void MaybeRegisterExtensionCommand(); |
| 102 void MaybeUnregisterExtensionCommand(bool only_if_active); |
| 103 |
101 // The browser action this view represents. The ExtensionAction is not owned | 104 // The browser action this view represents. The ExtensionAction is not owned |
102 // by this class. | 105 // by this class. |
103 ExtensionAction* browser_action_; | 106 ExtensionAction* browser_action_; |
104 | 107 |
105 // The extension associated with the browser action we're displaying. | 108 // The extension associated with the browser action we're displaying. |
106 const extensions::Extension* extension_; | 109 const extensions::Extension* extension_; |
107 | 110 |
108 // The object that is waiting for the image loading to complete | 111 // The object that is waiting for the image loading to complete |
109 // asynchronously. | 112 // asynchronously. |
110 ImageLoadingTracker tracker_; | 113 ImageLoadingTracker tracker_; |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 // The container for this view. | 164 // The container for this view. |
162 BrowserActionsContainer* panel_; | 165 BrowserActionsContainer* panel_; |
163 | 166 |
164 // The button this view contains. | 167 // The button this view contains. |
165 BrowserActionButton* button_; | 168 BrowserActionButton* button_; |
166 | 169 |
167 DISALLOW_COPY_AND_ASSIGN(BrowserActionView); | 170 DISALLOW_COPY_AND_ASSIGN(BrowserActionView); |
168 }; | 171 }; |
169 | 172 |
170 #endif // CHROME_BROWSER_UI_VIEWS_BROWSER_ACTION_VIEW_H_ | 173 #endif // CHROME_BROWSER_UI_VIEWS_BROWSER_ACTION_VIEW_H_ |
OLD | NEW |