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

Unified Diff: chrome/browser/extensions/page_action_controller.h

Issue 270153004: Introduce ActiveScriptController; track active extension scripts (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: UMA Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
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..24a5d5681c1260d841e648e679cf10b6f5ba55c2 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,22 @@ 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(
+ // LocationBarController::Provider implementation.
+ virtual std::vector<ExtensionAction*> GetCurrentActions() OVERRIDE;
+ virtual LocationBarController::Action OnClicked(
+ const Extension* extension,
+ LocationBarController::MouseButton button) OVERRIDE;
+ virtual void NavigatedMainFrame(
const content::LoadCommittedDetails& details,
const content::FrameNavigateParams& params) OVERRIDE;
private:
- // Gets the Profile for the web contents.
- Profile* GetProfile() const;
-
- // Gets the ExtensionRegistry for the web contents.
- ExtensionRegistry* GetExtensionRegistry() const;
+ Profile* GetProfile();
DISALLOW_COPY_AND_ASSIGN(PageActionController);
};

Powered by Google App Engine
This is Rietveld 408576698