diff options
author | Kristian Monsen <kristianm@google.com> | 2011-05-24 16:24:13 +0100 |
---|---|---|
committer | Kristian Monsen <kristianm@google.com> | 2011-05-25 14:13:32 +0100 |
commit | 3f50c38dc070f4bb515c1b64450dae14f316474e (patch) | |
tree | 29f309f9534e05c47244eedb438fc612578d133b /chrome/browser/dom_ui/app_launcher_handler.cc | |
parent | e23bef148f7be2bdf9c3cb2cd3aa5ceebf1190fb (diff) | |
download | external_chromium-3f50c38dc070f4bb515c1b64450dae14f316474e.zip external_chromium-3f50c38dc070f4bb515c1b64450dae14f316474e.tar.gz external_chromium-3f50c38dc070f4bb515c1b64450dae14f316474e.tar.bz2 |
Merge Chromium at r10.0.634.0: Initial merge by git.
Change-Id: Iac2af492818d119bcc2562eb5fdabf5ab0b6df9c
Diffstat (limited to 'chrome/browser/dom_ui/app_launcher_handler.cc')
-rw-r--r-- | chrome/browser/dom_ui/app_launcher_handler.cc | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/chrome/browser/dom_ui/app_launcher_handler.cc b/chrome/browser/dom_ui/app_launcher_handler.cc index 64d128a..aba23f1 100644 --- a/chrome/browser/dom_ui/app_launcher_handler.cc +++ b/chrome/browser/dom_ui/app_launcher_handler.cc @@ -4,7 +4,6 @@ #include "chrome/browser/dom_ui/app_launcher_handler.h" -#include "app/animation.h" #include "base/metrics/histogram.h" #include "base/string_number_conversions.h" #include "base/string_split.h" @@ -32,6 +31,7 @@ #include "gfx/rect.h" #include "grit/browser_resources.h" #include "grit/generated_resources.h" +#include "ui/base/animation/animation.h" namespace { @@ -193,15 +193,10 @@ void AppLauncherHandler::FillAppDictionary(DictionaryValue* dictionary) { dictionary->SetBoolean("disableCreateAppShortcut", true); #endif - // We always show the launcher on Chrome OS. On Desktop Chrome, only show it - // if we've installed our default apps. -#if defined(OS_CHROMEOS) - dictionary->SetBoolean("showLauncher", true); -#else dictionary->SetBoolean( "showLauncher", - extensions_service_->default_apps()->GetDefaultAppsInstalled()); -#endif + extensions_service_->default_apps()->ShouldShowAppLauncher( + extensions_service_->GetAppIds())); } void AppLauncherHandler::HandleGetApps(const ListValue* args) { @@ -217,7 +212,7 @@ void AppLauncherHandler::HandleGetApps(const ListValue* args) { // b) Conceptually, it doesn't really make sense to count a // prefchange-triggered refresh as a promo 'view'. DefaultApps* default_apps = extensions_service_->default_apps(); - if (default_apps->CheckShouldShowPromo(extensions_service_->GetAppIds())) { + if (default_apps->ShouldShowPromo(extensions_service_->GetAppIds())) { dictionary.SetBoolean("showPromo", true); default_apps->DidShowPromo(); promo_active_ = true; @@ -335,12 +330,11 @@ void AppLauncherHandler::HandleHideAppsPromo(const ListValue* args) { UMA_HISTOGRAM_ENUMERATION(extension_misc::kAppsPromoHistogram, extension_misc::PROMO_CLOSE, extension_misc::PROMO_BUCKET_BOUNDARY); - DefaultApps* default_apps = extensions_service_->default_apps(); - const ExtensionIdSet* app_ids = default_apps->GetDefaultApps(); - DCHECK(*app_ids == extensions_service_->GetAppIds()); - for (ExtensionIdSet::const_iterator iter = app_ids->begin(); - iter != app_ids->end(); ++iter) { + DefaultApps* default_apps = extensions_service_->default_apps(); + const ExtensionIdSet& app_ids = default_apps->default_apps(); + for (ExtensionIdSet::const_iterator iter = app_ids.begin(); + iter != app_ids.end(); ++iter) { if (extensions_service_->GetExtensionById(*iter, true)) extensions_service_->UninstallExtension(*iter, false); } @@ -416,7 +410,7 @@ void AppLauncherHandler::AnimateAppIcon(const Extension* extension, const gfx::Rect& rect) { // We make this check for the case of minimized windows, unit tests, etc. if (platform_util::IsVisible(dom_ui_->tab_contents()->GetNativeView()) && - Animation::ShouldRenderRichAnimation()) { + ui::Animation::ShouldRenderRichAnimation()) { #if defined(OS_WIN) AppLaunchedAnimation::Show(extension, rect); #else |