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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 public: | 47 public: |
48 // Returns the current tab's ID, or -1 if there is no current tab. | 48 // Returns the current tab's ID, or -1 if there is no current tab. |
49 virtual int GetCurrentTabId() const = 0; | 49 virtual int GetCurrentTabId() const = 0; |
50 | 50 |
51 // Called when the user clicks on the browser action icon. | 51 // Called when the user clicks on the browser action icon. |
52 virtual void OnBrowserActionExecuted(BrowserActionButton* button) = 0; | 52 virtual void OnBrowserActionExecuted(BrowserActionButton* button) = 0; |
53 | 53 |
54 // Called when a browser action becomes visible/hidden. | 54 // Called when a browser action becomes visible/hidden. |
55 virtual void OnBrowserActionVisibilityChanged() = 0; | 55 virtual void OnBrowserActionVisibilityChanged() = 0; |
56 | 56 |
| 57 virtual bool NeedToShowMultipleIconStates() const; |
| 58 virtual bool NeedToShowTooltip() const; |
| 59 |
57 protected: | 60 protected: |
58 virtual ~Delegate() {} | 61 virtual ~Delegate() {} |
59 }; | 62 }; |
60 | 63 |
61 BrowserActionView(const extensions::Extension* extension, | 64 BrowserActionView(const extensions::Extension* extension, |
62 Browser* browser, | 65 Browser* browser, |
63 Delegate* delegate); | 66 Delegate* delegate); |
64 virtual ~BrowserActionView(); | 67 virtual ~BrowserActionView(); |
65 | 68 |
66 BrowserActionButton* button() { return button_; } | 69 BrowserActionButton* button() { return button_; } |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 // The observer that we need to notify when the icon of the button has been | 248 // The observer that we need to notify when the icon of the button has been |
246 // updated. | 249 // updated. |
247 IconObserver* icon_observer_; | 250 IconObserver* icon_observer_; |
248 | 251 |
249 friend class base::DeleteHelper<BrowserActionButton>; | 252 friend class base::DeleteHelper<BrowserActionButton>; |
250 | 253 |
251 DISALLOW_COPY_AND_ASSIGN(BrowserActionButton); | 254 DISALLOW_COPY_AND_ASSIGN(BrowserActionButton); |
252 }; | 255 }; |
253 | 256 |
254 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_BROWSER_ACTION_VIEW_H_ | 257 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_BROWSER_ACTION_VIEW_H_ |
OLD | NEW |