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

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

Issue 496403003: Remove NOTIFICATION_EXTENSION_PAGE_ACTIONS_UPDATED (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Latest master for CQ Created 6 years, 3 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 | Annotate | Revision Log
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 "base/macros.h"
9
10 #include "chrome/browser/extensions/api/extension_action/extension_action_api.h"
11 #include "chrome/browser/extensions/location_bar_controller.h" 9 #include "chrome/browser/extensions/location_bar_controller.h"
12 10
13 class Profile; 11 namespace content {
12 class BrowserContext;
13 class WebContents;
14 }
14 15
15 namespace extensions { 16 namespace extensions {
16 class ExtensionRegistry; 17 class Extension;
17 18
18 // A LocationBarControllerProvider which populates the location bar with icons 19 // A LocationBarControllerProvider which populates the location bar with icons
19 // based on the page_action extension API. 20 // based on the page_action extension API.
20 // TODO(rdevlin.cronin): This isn't really a controller. 21 // TODO(rdevlin.cronin): This isn't really a controller.
21 class PageActionController : public LocationBarController::ActionProvider, 22 class PageActionController : public LocationBarController::ActionProvider {
22 public ExtensionActionAPI::Observer {
23 public: 23 public:
24 explicit PageActionController(content::WebContents* web_contents); 24 explicit PageActionController(content::WebContents* web_contents);
25 virtual ~PageActionController(); 25 virtual ~PageActionController();
26 26
27 // LocationBarController::Provider implementation. 27 // LocationBarController::Provider implementation.
28 virtual ExtensionAction* GetActionForExtension(const Extension* extension) 28 virtual ExtensionAction* GetActionForExtension(const Extension* extension)
29 OVERRIDE; 29 OVERRIDE;
30 virtual void OnNavigated() OVERRIDE; 30 virtual void OnNavigated() OVERRIDE;
31 31
32 private: 32 private:
33 // ExtensionActionAPI::Observer implementation.
34 virtual void OnExtensionActionUpdated(
35 ExtensionAction* extension_action,
36 content::WebContents* web_contents,
37 content::BrowserContext* browser_context) OVERRIDE;
38
39 // Returns the associated Profile.
40 Profile* GetProfile();
41
42 // The associated WebContents. 33 // The associated WebContents.
43 content::WebContents* web_contents_; 34 content::WebContents* web_contents_;
44 35
45 ScopedObserver<ExtensionActionAPI, ExtensionActionAPI::Observer> 36 // The associated browser context.
46 extension_action_observer_; 37 content::BrowserContext* browser_context_;
47 38
48 DISALLOW_COPY_AND_ASSIGN(PageActionController); 39 DISALLOW_COPY_AND_ASSIGN(PageActionController);
49 }; 40 };
50 41
51 } // namespace extensions 42 } // namespace extensions
52 43
53 #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