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

Unified Diff: chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.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/location_bar_view_mac.mm
diff --git a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
index 2cfdea9f7c277e0a7ca06c9371fb2504e3e8f5ea..81afe2debb8693628a6ff295e7518c356b7b36fb 100644
--- a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
+++ b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
@@ -629,6 +629,16 @@ void LocationBarViewMac::ModelChanged(const SearchModel::State& old_state,
Layout();
}
+void LocationBarViewMac::ActivatePageAction(const std::string& extension_id) {
+ for (size_t i = 0; i < page_action_decorations_.size(); ++i) {
+ if (page_action_decorations_[i]->page_action()->extension_id() ==
+ extension_id) {
+ page_action_decorations_[i]->ActivatePageAction();
+ return;
+ }
+ }
+}
+
void LocationBarViewMac::PostNotification(NSString* notification) {
[[NSNotificationCenter defaultCenter] postNotificationName:notification
object:[NSValue valueWithPointer:this]];

Powered by Google App Engine
This is Rietveld 408576698