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

Side by Side Diff: chrome/browser/extensions/page_action_controller.h

Issue 454053005: Consolidate ExtensionToolbarModel::Action and LocationBarController::Action (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Latest master for CQ Created 6 years, 4 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 (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_EXTENSIONS_PAGE_ACTION_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_PAGE_ACTION_CONTROLLER_H_
6 #define CHROME_BROWSER_EXTENSIONS_PAGE_ACTION_CONTROLLER_H_ 6 #define CHROME_BROWSER_EXTENSIONS_PAGE_ACTION_CONTROLLER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "chrome/browser/extensions/location_bar_controller.h" 10 #include "chrome/browser/extensions/location_bar_controller.h"
11 11
12 class Profile; 12 class Profile;
13 13
14 namespace extensions { 14 namespace extensions {
15 class ExtensionRegistry; 15 class ExtensionRegistry;
16 16
17 // A LocationBarControllerProvider which populates the location bar with icons 17 // A LocationBarControllerProvider which populates the location bar with icons
18 // based on the page_action extension API. 18 // based on the page_action extension API.
19 // TODO(rdevlin.cronin): This isn't really a controller. 19 // TODO(rdevlin.cronin): This isn't really a controller.
20 class PageActionController : public LocationBarController::ActionProvider { 20 class PageActionController : public LocationBarController::ActionProvider {
21 public: 21 public:
22 explicit PageActionController(content::WebContents* web_contents); 22 explicit PageActionController(content::WebContents* web_contents);
23 virtual ~PageActionController(); 23 virtual ~PageActionController();
24 24
25 // LocationBarController::Provider implementation. 25 // LocationBarController::Provider implementation.
26 virtual ExtensionAction* GetActionForExtension(const Extension* extension) 26 virtual ExtensionAction* GetActionForExtension(const Extension* extension)
27 OVERRIDE; 27 OVERRIDE;
28 virtual LocationBarController::Action OnClicked( 28 virtual ExtensionAction::ShowAction OnClicked(
29 const Extension* extension) OVERRIDE; 29 const Extension* extension) OVERRIDE;
30 virtual void OnNavigated() OVERRIDE; 30 virtual void OnNavigated() OVERRIDE;
31 31
32 private: 32 private:
33 // Returns the associated Profile. 33 // Returns the associated Profile.
34 Profile* GetProfile(); 34 Profile* GetProfile();
35 35
36 // The associated WebContents. 36 // The associated WebContents.
37 content::WebContents* web_contents_; 37 content::WebContents* web_contents_;
38 38
39 DISALLOW_COPY_AND_ASSIGN(PageActionController); 39 DISALLOW_COPY_AND_ASSIGN(PageActionController);
40 }; 40 };
41 41
42 } // namespace extensions 42 } // namespace extensions
43 43
44 #endif // CHROME_BROWSER_EXTENSIONS_PAGE_ACTION_CONTROLLER_H_ 44 #endif // CHROME_BROWSER_EXTENSIONS_PAGE_ACTION_CONTROLLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/location_bar_controller.cc ('k') | chrome/browser/extensions/page_action_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698