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

Side by Side 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: remove test change 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chromeos/background/ash_user_wallpaper_delegate.h" 5 #include "chrome/browser/chromeos/background/ash_user_wallpaper_delegate.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/desktop_background/desktop_background_controller.h" 8 #include "ash/desktop_background/desktop_background_controller.h"
9 #include "ash/desktop_background/desktop_background_resources.h" 9 #include "ash/desktop_background/desktop_background_resources.h"
10 #include "ash/wm/window_animations.h"
10 #include "base/logging.h" 11 #include "base/logging.h"
11 #include "chrome/browser/chromeos/extensions/wallpaper_manager_api.h" 12 #include "chrome/browser/chromeos/extensions/wallpaper_manager_api.h"
12 #include "chrome/browser/chromeos/login/user_manager.h" 13 #include "chrome/browser/chromeos/login/user_manager.h"
14 #include "chrome/browser/chromeos/login/wizard_controller.h"
13 #include "chrome/browser/profiles/profile_manager.h" 15 #include "chrome/browser/profiles/profile_manager.h"
14 #include "chrome/browser/ui/browser.h" 16 #include "chrome/browser/ui/browser.h"
15 #include "chrome/browser/ui/browser_finder.h" 17 #include "chrome/browser/ui/browser_finder.h"
16 #include "chrome/browser/ui/chrome_pages.h" 18 #include "chrome/browser/ui/chrome_pages.h"
17 #include "chrome/common/chrome_notification_types.h" 19 #include "chrome/common/chrome_notification_types.h"
18 #include "content/public/browser/notification_service.h" 20 #include "content/public/browser/notification_service.h"
19 21
20 namespace chromeos { 22 namespace chromeos {
21 23
22 namespace { 24 namespace {
23 25
24 class UserWallpaperDelegate: public ash::UserWallpaperDelegate { 26 class UserWallpaperDelegate: public ash::UserWallpaperDelegate {
25 public: 27 public:
26 UserWallpaperDelegate() { 28 UserWallpaperDelegate() {
27 } 29 }
28 30
29 virtual ~UserWallpaperDelegate() { 31 virtual ~UserWallpaperDelegate() {
30 } 32 }
31 33
34 virtual ash::WindowVisibilityAnimationType GetAnimationType() OVERRIDE {
35 bool is_registered = WizardController::IsDeviceRegistered();
36 // TODO(nkostylev): Figure out whether this would affect autotests as well.
37 if (is_registered)
38 return ash::WINDOW_VISIBILITY_ANIMATION_TYPE_FADE;
39 else
40 return ash::WINDOW_VISIBILITY_ANIMATION_TYPE_BRIGHTNESS_GRAYSCALE;
41 }
42
32 virtual void InitializeWallpaper() OVERRIDE { 43 virtual void InitializeWallpaper() OVERRIDE {
33 chromeos::UserManager::Get()->InitializeWallpaper(); 44 chromeos::UserManager::Get()->InitializeWallpaper();
34 } 45 }
35 46
36 virtual void OpenSetWallpaperPage() OVERRIDE { 47 virtual void OpenSetWallpaperPage() OVERRIDE {
37 wallpaper_manager_util::OpenWallpaperManager(); 48 wallpaper_manager_util::OpenWallpaperManager();
38 } 49 }
39 50
40 virtual bool CanOpenSetWallpaperPage() OVERRIDE { 51 virtual bool CanOpenSetWallpaperPage() OVERRIDE {
41 return !chromeos::UserManager::Get()->IsLoggedInAsGuest(); 52 return !chromeos::UserManager::Get()->IsLoggedInAsGuest();
(...skipping 10 matching lines...) Expand all
52 DISALLOW_COPY_AND_ASSIGN(UserWallpaperDelegate); 63 DISALLOW_COPY_AND_ASSIGN(UserWallpaperDelegate);
53 }; 64 };
54 65
55 } // namespace 66 } // namespace
56 67
57 ash::UserWallpaperDelegate* CreateUserWallpaperDelegate() { 68 ash::UserWallpaperDelegate* CreateUserWallpaperDelegate() {
58 return new chromeos::UserWallpaperDelegate(); 69 return new chromeos::UserWallpaperDelegate();
59 } 70 }
60 71
61 } // namespace chromeos 72 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698