diff options
Diffstat (limited to 'chrome/browser/browser.cc')
-rw-r--r-- | chrome/browser/browser.cc | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc index 877f887..514d0ff 100644 --- a/chrome/browser/browser.cc +++ b/chrome/browser/browser.cc @@ -83,6 +83,7 @@ #include "chrome/browser/user_data_manager.h" #include "chrome/browser/view_ids.h" #include "chrome/browser/views/location_bar_view.h" +#include "chrome/browser/views/theme_install_bubble_view.h" #include "chrome/common/child_process_host.h" #endif // OS_WIN @@ -202,6 +203,10 @@ Browser::Browser(Type type, Profile* profile) registrar_.Add(this, NotificationType::BROWSER_THEME_CHANGED, NotificationService::AllSources()); + // Need to know when to alert the user of theme install delay. + registrar_.Add(this, NotificationType::EXTENSION_READY_FOR_INSTALL, + NotificationService::AllSources()); + InitCommandState(); BrowserList::AddBrowser(this); @@ -2160,6 +2165,23 @@ void Browser::Observe(NotificationType type, window()->UserChangedTheme(); break; + case NotificationType::EXTENSION_READY_FOR_INSTALL: { +#if defined(OS_WIN) + if (BrowserList::GetLastActive() != this) + break; + TabContents* tab_contents = + BrowserList::GetLastActive()->GetSelectedTabContents(); + if (!tab_contents) + break; + if (platform_util::IsVisible(tab_contents->GetNativeView())) + ThemeInstallBubbleView::Show(tab_contents); +#else + NOTIMPLEMENTED(); +#endif + break; + } + + default: NOTREACHED() << "Got a notification we didn't register for."; } |