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

Unified Diff: chrome/browser/ui/cocoa/location_bar/page_action_decoration.h

Issue 496863003: Consolidate ExtensionAction execution code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/location_bar/page_action_decoration.h
diff --git a/chrome/browser/ui/cocoa/location_bar/page_action_decoration.h b/chrome/browser/ui/cocoa/location_bar/page_action_decoration.h
index 9fd865b26dd199b3acf326d4836730a995139840..4e3b77e9ad1d11868f37f010c63e88f66ffa58d5 100644
--- a/chrome/browser/ui/cocoa/location_bar/page_action_decoration.h
+++ b/chrome/browser/ui/cocoa/location_bar/page_action_decoration.h
@@ -20,6 +20,10 @@ namespace content {
class WebContents;
}
+namespace extensions {
+class Extension;
+}
+
// PageActionDecoration is used to display the icon for a given Page
// Action and notify the extension when the icon is clicked.
@@ -67,6 +71,9 @@ class PageActionDecoration : public ImageDecoration,
// Show the popup in the frame, with the given URL.
void ShowPopup(const NSRect& frame, const GURL& popup_url);
+ // Returns the extension associated with the page action.
+ const extensions::Extension* GetExtension();
+
// Overridden from NotificationObserver:
virtual void Observe(int type,
const content::NotificationSource& source,
@@ -83,7 +90,6 @@ class PageActionDecoration : public ImageDecoration,
// profile.
ExtensionAction* page_action_;
-
// The object that will be used to get the page action icon for us.
// It may load the icon asynchronously (in which case the initial icon
// returned by the factory will be transparent), so we have to observe it for

Powered by Google App Engine
This is Rietveld 408576698