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 9665cf15d2dc9a0787624d816f4c20b669607301..effbc7394ae0fa09cdcfa5137857295945510ef1 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 |
@@ -145,7 +145,7 @@ LocationBarViewMac::LocationBarViewMac(AutocompleteTextField* field, |
registrar_.Add( |
this, |
- extensions::NOTIFICATION_EXTENSION_PAGE_ACTION_VISIBILITY_CHANGED, |
+ extensions::NOTIFICATION_EXTENSION_PAGE_ACTIONS_UPDATED, |
content::NotificationService::AllSources()); |
content::Source<Profile> profile_source = content::Source<Profile>(profile); |
registrar_.Add(this, |
@@ -225,27 +225,13 @@ void LocationBarViewMac::UpdateManagePasswordsIconAndBubble() { |
} |
void LocationBarViewMac::UpdatePageActions() { |
- size_t count_before = page_action_decorations_.size(); |
RefreshPageActionDecorations(); |
Layout(); |
- if (page_action_decorations_.size() != count_before) { |
- content::NotificationService::current()->Notify( |
- extensions::NOTIFICATION_EXTENSION_PAGE_ACTION_COUNT_CHANGED, |
- content::Source<LocationBar>(this), |
- content::NotificationService::NoDetails()); |
- } |
} |
void LocationBarViewMac::InvalidatePageActions() { |
- size_t count_before = page_action_decorations_.size(); |
DeletePageActionDecorations(); |
Layout(); |
- if (page_action_decorations_.size() != count_before) { |
- content::NotificationService::current()->Notify( |
- extensions::NOTIFICATION_EXTENSION_PAGE_ACTION_COUNT_CHANGED, |
- content::Source<LocationBar>(this), |
- content::NotificationService::NoDetails()); |
- } |
} |
void LocationBarViewMac::UpdateOpenPDFInReaderPrompt() { |
@@ -635,9 +621,8 @@ void LocationBarViewMac::Observe(int type, |
const content::NotificationSource& source, |
const content::NotificationDetails& details) { |
switch (type) { |
- case extensions::NOTIFICATION_EXTENSION_PAGE_ACTION_VISIBILITY_CHANGED: { |
- WebContents* contents = GetWebContents(); |
- if (content::Details<WebContents>(contents) != details) |
+ case extensions::NOTIFICATION_EXTENSION_PAGE_ACTIONS_UPDATED: { |
+ if (content::Source<WebContents>(source).ptr() != GetWebContents()) |
return; |
[field_ updateMouseTracking]; |