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

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

Issue 161293002: mac: Allows extensions to hide the bookmark page menu item. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make sure changes only apply to OSX. Created 6 years, 10 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.mm
diff --git a/chrome/browser/ui/cocoa/location_bar/page_action_decoration.mm b/chrome/browser/ui/cocoa/location_bar/page_action_decoration.mm
index f43710001f672dec05d29e4066583250653c8bbb..0419cd31d087174741954185aaf7376d5e9dcc36 100644
--- a/chrome/browser/ui/cocoa/location_bar/page_action_decoration.mm
+++ b/chrome/browser/ui/cocoa/location_bar/page_action_decoration.mm
@@ -88,6 +88,10 @@ bool PageActionDecoration::OnMousePressed(NSRect frame) {
return ActivatePageAction(frame);
}
+void PageActionDecoration::ActivatePageAction() {
+ ActivatePageAction(owner_->GetPageActionFrame(page_action_));
+}
+
bool PageActionDecoration::ActivatePageAction(NSRect frame) {
WebContents* web_contents = owner_->GetWebContents();
if (!web_contents) {
@@ -249,7 +253,7 @@ void PageActionDecoration::Observe(
if (extension_id != page_action_->extension_id())
break;
if (IsVisible())
- ActivatePageAction(owner_->GetPageActionFrame(page_action_));
+ ActivatePageAction();
break;
}
« no previous file with comments | « chrome/browser/ui/cocoa/location_bar/page_action_decoration.h ('k') | chrome/browser/ui/cocoa/toolbar/toolbar_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698