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

Unified Diff: chrome/browser/chromeos/background/ash_user_wallpaper_delegate.cc

Issue 10800020: Add brightness/grayscale animations and use them for OOBE boot transition (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix hide animation Created 8 years, 5 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
« no previous file with comments | « ash/wm/window_animations_unittest.cc ('k') | ui/compositor/layer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/background/ash_user_wallpaper_delegate.cc
diff --git a/chrome/browser/chromeos/background/ash_user_wallpaper_delegate.cc b/chrome/browser/chromeos/background/ash_user_wallpaper_delegate.cc
index ed4cc7b35ad7ff6a50c2207f9d393a831bf164e9..f02fe2be9171ec04e8ebaafabc408ec68a458772 100644
--- a/chrome/browser/chromeos/background/ash_user_wallpaper_delegate.cc
+++ b/chrome/browser/chromeos/background/ash_user_wallpaper_delegate.cc
@@ -7,14 +7,18 @@
#include "ash/shell.h"
#include "ash/desktop_background/desktop_background_controller.h"
#include "ash/desktop_background/desktop_background_resources.h"
+#include "ash/wm/window_animations.h"
+#include "base/command_line.h"
#include "base/logging.h"
#include "chrome/browser/chromeos/extensions/wallpaper_manager_api.h"
#include "chrome/browser/chromeos/login/user_manager.h"
+#include "chrome/browser/chromeos/login/wizard_controller.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_finder.h"
#include "chrome/browser/ui/chrome_pages.h"
#include "chrome/common/chrome_notification_types.h"
+#include "chrome/common/chrome_switches.h"
#include "content/public/browser/notification_service.h"
namespace chromeos {
@@ -29,6 +33,18 @@ class UserWallpaperDelegate: public ash::UserWallpaperDelegate {
virtual ~UserWallpaperDelegate() {
}
+ virtual ash::WindowVisibilityAnimationType GetAnimationType() OVERRIDE {
+ if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableNewOobe))
+ return ash::WINDOW_VISIBILITY_ANIMATION_TYPE_FADE;
+
+ bool is_registered = WizardController::IsDeviceRegistered();
+ // TODO(nkostylev): Figure out whether this would affect autotests as well.
+ if (is_registered)
+ return ash::WINDOW_VISIBILITY_ANIMATION_TYPE_FADE;
+ else
+ return ash::WINDOW_VISIBILITY_ANIMATION_TYPE_BRIGHTNESS_GRAYSCALE;
+ }
+
virtual void InitializeWallpaper() OVERRIDE {
chromeos::UserManager::Get()->InitializeWallpaper();
}
« no previous file with comments | « ash/wm/window_animations_unittest.cc ('k') | ui/compositor/layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698