Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(552)

Side by Side Diff: chrome/browser/ui/extensions/extension_action_view_controller.h

Issue 1214243003: [Extensions UI] Clean up extension icon generation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: s/skia/ImageSkia Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 ExtensionActionViewController(const extensions::Extension* extension, 43 ExtensionActionViewController(const extensions::Extension* extension,
44 Browser* browser, 44 Browser* browser,
45 ExtensionAction* extension_action, 45 ExtensionAction* extension_action,
46 ToolbarActionsBar* toolbar_actions_bar); 46 ToolbarActionsBar* toolbar_actions_bar);
47 ~ExtensionActionViewController() override; 47 ~ExtensionActionViewController() override;
48 48
49 // ToolbarActionViewController: 49 // ToolbarActionViewController:
50 const std::string& GetId() const override; 50 const std::string& GetId() const override;
51 void SetDelegate(ToolbarActionViewDelegate* delegate) override; 51 void SetDelegate(ToolbarActionViewDelegate* delegate) override;
52 gfx::Image GetIcon(content::WebContents* web_contents) override; 52 gfx::Image GetIcon(content::WebContents* web_contents,
53 gfx::ImageSkia GetIconWithBadge() override; 53 const gfx::Size& size) override;
54 base::string16 GetActionName() const override; 54 base::string16 GetActionName() const override;
55 base::string16 GetAccessibleName(content::WebContents* web_contents) const 55 base::string16 GetAccessibleName(content::WebContents* web_contents) const
56 override; 56 override;
57 base::string16 GetTooltip(content::WebContents* web_contents) const override; 57 base::string16 GetTooltip(content::WebContents* web_contents) const override;
58 bool IsEnabled(content::WebContents* web_contents) const override; 58 bool IsEnabled(content::WebContents* web_contents) const override;
59 bool WantsToRun(content::WebContents* web_contents) const override; 59 bool WantsToRun(content::WebContents* web_contents) const override;
60 bool HasPopup(content::WebContents* web_contents) const override; 60 bool HasPopup(content::WebContents* web_contents) const override;
61 void HidePopup() override; 61 void HidePopup() override;
62 gfx::NativeView GetPopupNativeView() override; 62 gfx::NativeView GetPopupNativeView() override;
63 ui::MenuModel* GetContextMenu() override; 63 ui::MenuModel* GetContextMenu() override;
64 void OnContextMenuClosed() override; 64 void OnContextMenuClosed() override;
65 bool CanDrag() const override; 65 bool CanDrag() const override;
66 bool ExecuteAction(bool by_user) override; 66 bool ExecuteAction(bool by_user) override;
67 void UpdateState() override; 67 void UpdateState() override;
68 void PaintExtra(gfx::Canvas* canvas,
69 const gfx::Rect& bounds,
70 content::WebContents* web_contents) const override;
71 void RegisterCommand() override; 68 void RegisterCommand() override;
72 69
73 // ExtensionContextMenuModel::PopupDelegate: 70 // ExtensionContextMenuModel::PopupDelegate:
74 void InspectPopup() override; 71 void InspectPopup() override;
75 72
76 // Closes the active popup (whether it was this action's popup or not). 73 // Closes the active popup (whether it was this action's popup or not).
77 void HideActivePopup(); 74 void HideActivePopup();
78 75
79 76
80 // Populates |command| with the command associated with |extension|, if one 77 // Populates |command| with the command associated with |extension|, if one
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 176
180 ScopedObserver<extensions::ExtensionHost, extensions::ExtensionHostObserver> 177 ScopedObserver<extensions::ExtensionHost, extensions::ExtensionHostObserver>
181 popup_host_observer_; 178 popup_host_observer_;
182 179
183 base::WeakPtrFactory<ExtensionActionViewController> weak_factory_; 180 base::WeakPtrFactory<ExtensionActionViewController> weak_factory_;
184 181
185 DISALLOW_COPY_AND_ASSIGN(ExtensionActionViewController); 182 DISALLOW_COPY_AND_ASSIGN(ExtensionActionViewController);
186 }; 183 };
187 184
188 #endif // CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_ACTION_VIEW_CONTROLLER_H_ 185 #endif // CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_ACTION_VIEW_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698