| Index: chrome/browser/extensions/page_action_controller.h
|
| diff --git a/chrome/browser/extensions/page_action_controller.h b/chrome/browser/extensions/page_action_controller.h
|
| index 88320d3ca1a118f4d4750091244b69a8c8987ed6..af7903723660f353b460a88c0f8f19aadf496e2e 100644
|
| --- a/chrome/browser/extensions/page_action_controller.h
|
| +++ b/chrome/browser/extensions/page_action_controller.h
|
| @@ -7,40 +7,37 @@
|
|
|
| #include <string>
|
|
|
| -#include "base/observer_list.h"
|
| #include "chrome/browser/extensions/location_bar_controller.h"
|
| -#include "content/public/browser/web_contents_observer.h"
|
|
|
| class Profile;
|
|
|
| namespace extensions {
|
| class ExtensionRegistry;
|
|
|
| -// A LocationBarController which populates the location bar with icons based
|
| -// on the page_action extension API.
|
| -class PageActionController : public LocationBarController,
|
| - public content::WebContentsObserver {
|
| +// A LocationBarControllerProvider which populates the location bar with icons
|
| +// based on the page_action extension API.
|
| +// TODO(rdevlin.cronin): This isn't really a controller.
|
| +class PageActionController : public LocationBarController::ActionProvider {
|
| public:
|
| explicit PageActionController(content::WebContents* web_contents);
|
| virtual ~PageActionController();
|
|
|
| - // LocationBarController implementation.
|
| - virtual std::vector<ExtensionAction*> GetCurrentActions() const OVERRIDE;
|
| - virtual Action OnClicked(const std::string& extension_id,
|
| - int mouse_button) OVERRIDE;
|
| - virtual void NotifyChange() OVERRIDE;
|
| -
|
| - // content::WebContentsObserver implementation.
|
| - virtual void DidNavigateMainFrame(
|
| - const content::LoadCommittedDetails& details,
|
| - const content::FrameNavigateParams& params) OVERRIDE;
|
| + // LocationBarController::Provider implementation.
|
| + virtual ExtensionAction* GetActionForExtension(const Extension* extension)
|
| + OVERRIDE;
|
| + virtual LocationBarController::Action OnClicked(
|
| + const Extension* extension) OVERRIDE;
|
| + virtual void OnNavigated() OVERRIDE;
|
|
|
| private:
|
| - // Gets the Profile for the web contents.
|
| - Profile* GetProfile() const;
|
| + // Returns the associated Profile.
|
| + Profile* GetProfile();
|
| +
|
| + // The current page actions for the associated WebContents.
|
| + std::vector<ExtensionAction*> current_actions_;
|
|
|
| - // Gets the ExtensionRegistry for the web contents.
|
| - ExtensionRegistry* GetExtensionRegistry() const;
|
| + // The associated WebContents.
|
| + content::WebContents* web_contents_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(PageActionController);
|
| };
|
|
|