OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_EXTENSIONS_EXTENSION_ACTION_VIEW_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_ACTION_VIEW_CONTROLLER_H_ |
6 #define CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_ACTION_VIEW_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_ACTION_VIEW_CONTROLLER_H_ |
7 | 7 |
8 #include "base/memory/weak_ptr.h" | 8 #include "base/memory/weak_ptr.h" |
9 #include "base/scoped_observer.h" | 9 #include "base/scoped_observer.h" |
10 #include "chrome/browser/extensions/extension_action_icon_factory.h" | 10 #include "chrome/browser/extensions/extension_action_icon_factory.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 // The different options for showing a popup. | 41 // The different options for showing a popup. |
42 enum PopupShowAction { SHOW_POPUP, SHOW_POPUP_AND_INSPECT }; | 42 enum PopupShowAction { SHOW_POPUP, SHOW_POPUP_AND_INSPECT }; |
43 | 43 |
44 ExtensionActionViewController(const extensions::Extension* extension, | 44 ExtensionActionViewController(const extensions::Extension* extension, |
45 Browser* browser, | 45 Browser* browser, |
46 ExtensionAction* extension_action, | 46 ExtensionAction* extension_action, |
47 ToolbarActionsBar* toolbar_actions_bar); | 47 ToolbarActionsBar* toolbar_actions_bar); |
48 ~ExtensionActionViewController() override; | 48 ~ExtensionActionViewController() override; |
49 | 49 |
50 // ToolbarActionViewController: | 50 // ToolbarActionViewController: |
51 const std::string& GetId() const override; | 51 std::string GetId() const override; |
52 void SetDelegate(ToolbarActionViewDelegate* delegate) override; | 52 void SetDelegate(ToolbarActionViewDelegate* delegate) override; |
53 gfx::Image GetIcon(content::WebContents* web_contents, | 53 gfx::Image GetIcon(content::WebContents* web_contents, |
54 const gfx::Size& size) override; | 54 const gfx::Size& size) override; |
55 base::string16 GetActionName() const override; | 55 base::string16 GetActionName() const override; |
56 base::string16 GetAccessibleName(content::WebContents* web_contents) const | 56 base::string16 GetAccessibleName(content::WebContents* web_contents) const |
57 override; | 57 override; |
58 base::string16 GetTooltip(content::WebContents* web_contents) const override; | 58 base::string16 GetTooltip(content::WebContents* web_contents) const override; |
59 bool IsEnabled(content::WebContents* web_contents) const override; | 59 bool IsEnabled(content::WebContents* web_contents) const override; |
60 bool WantsToRun(content::WebContents* web_contents) const override; | 60 bool WantsToRun(content::WebContents* web_contents) const override; |
61 bool HasPopup(content::WebContents* web_contents) const override; | 61 bool HasPopup(content::WebContents* web_contents) const override; |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 | 187 |
188 ScopedObserver<extensions::ExtensionHost, extensions::ExtensionHostObserver> | 188 ScopedObserver<extensions::ExtensionHost, extensions::ExtensionHostObserver> |
189 popup_host_observer_; | 189 popup_host_observer_; |
190 | 190 |
191 base::WeakPtrFactory<ExtensionActionViewController> weak_factory_; | 191 base::WeakPtrFactory<ExtensionActionViewController> weak_factory_; |
192 | 192 |
193 DISALLOW_COPY_AND_ASSIGN(ExtensionActionViewController); | 193 DISALLOW_COPY_AND_ASSIGN(ExtensionActionViewController); |
194 }; | 194 }; |
195 | 195 |
196 #endif // CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_ACTION_VIEW_CONTROLLER_H_ | 196 #endif // CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_ACTION_VIEW_CONTROLLER_H_ |
OLD | NEW |