| Index: chrome/browser/cocoa/location_bar_view_mac.mm
|
| ===================================================================
|
| --- chrome/browser/cocoa/location_bar_view_mac.mm (revision 35229)
|
| +++ chrome/browser/cocoa/location_bar_view_mac.mm (working copy)
|
| @@ -99,6 +99,10 @@
|
| AutocompleteTextFieldCell* cell = [field_ autocompleteTextFieldCell];
|
| [cell setSecurityImageView:&security_image_view_];
|
| [cell setPageActionViewList:page_action_views_];
|
| +
|
| + registrar_.Add(this,
|
| + NotificationType::EXTENSION_PAGE_ACTION_VISIBILITY_CHANGED,
|
| + NotificationService::AllSources());
|
| }
|
|
|
| LocationBarViewMac::~LocationBarViewMac() {
|
| @@ -397,6 +401,25 @@
|
| [field_ resetFieldEditorFrameIfNeeded];
|
| }
|
|
|
| +void LocationBarViewMac::Observe(NotificationType type,
|
| + const NotificationSource& source,
|
| + const NotificationDetails& details) {
|
| + switch (type.value) {
|
| + case NotificationType::EXTENSION_PAGE_ACTION_VISIBILITY_CHANGED: {
|
| + TabContents* contents =
|
| + BrowserList::GetLastActive()->GetSelectedTabContents();
|
| + if (Details<TabContents>(contents) != details)
|
| + return;
|
| +
|
| + [field_ setNeedsDisplay:YES];
|
| + break;
|
| + }
|
| + default:
|
| + NOTREACHED() << "Unexpected notification";
|
| + break;
|
| + }
|
| +}
|
| +
|
| // LocationBarImageView---------------------------------------------------------
|
|
|
| void LocationBarViewMac::LocationBarImageView::SetImage(NSImage* image) {
|
|
|