diff options
author | mirandac@chromium.org <mirandac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-03 22:04:40 +0000 |
---|---|---|
committer | mirandac@chromium.org <mirandac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-03 22:04:40 +0000 |
commit | 91e1bd8b364d374372ab7be8c133ca03ffa1d2dd (patch) | |
tree | cc09b2d614599d8d3c3311d9a2080c071817f0f7 /chrome/browser/browser.cc | |
parent | 673336b8ef5a8708d7d3fe0dc8c3daa8d12d4097 (diff) | |
download | chromium_src-91e1bd8b364d374372ab7be8c133ca03ffa1d2dd.zip chromium_src-91e1bd8b364d374372ab7be8c133ca03ffa1d2dd.tar.gz chromium_src-91e1bd8b364d374372ab7be8c133ca03ffa1d2dd.tar.bz2 |
Add "loading..." message to theme install to counter jank.
BUG= http://crbug.com/17696
TEST= Install a theme. Note that a "loading" message appears to notify you that a theme is loading.
Review URL: http://codereview.chromium.org/191011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25383 0039d316-1c4b-4281-b951-d872f2087c98
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."; } |