| 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..632b56f8534b9942848facd895233d3e05458999 100644
|
| --- a/chrome/browser/extensions/page_action_controller.h
|
| +++ b/chrome/browser/extensions/page_action_controller.h
|
| @@ -7,9 +7,7 @@
|
|
|
| #include <string>
|
|
|
| -#include "base/observer_list.h"
|
| -#include "chrome/browser/extensions/location_bar_controller.h"
|
| -#include "content/public/browser/web_contents_observer.h"
|
| +#include "chrome/browser/extensions/location_bar_controller_provider.h"
|
|
|
| class Profile;
|
|
|
| @@ -18,29 +16,27 @@ 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 {
|
| +class PageActionController : public LocationBarControllerProvider {
|
| 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);
|
| };
|
|
|