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

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

Issue 475813004: Clean up NOTIFICATION_EXTENSION_PAGE_ACTION_[ COUNT | VISIBILITY ]_CHANGED (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Latest master for CQ 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/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];
« no previous file with comments | « chrome/browser/extensions/page_action_browsertest.cc ('k') | chrome/browser/ui/cocoa/location_bar/page_action_decoration.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698