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

Side by Side Diff: chrome/browser/chromeos/background/ash_user_wallpaper_delegate.cc

Issue 14362031: Move part of WizardController static code to StartupUtils (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fighting with whitespaces again Created 7 years, 8 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/user_wallpaper_delegate.h" 8 #include "ash/desktop_background/user_wallpaper_delegate.h"
9 #include "ash/wm/window_animations.h" 9 #include "ash/wm/window_animations.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "chrome/browser/chromeos/extensions/wallpaper_manager_util.h" 12 #include "chrome/browser/chromeos/extensions/wallpaper_manager_util.h"
13 #include "chrome/browser/chromeos/login/startup_utils.h"
13 #include "chrome/browser/chromeos/login/wallpaper_manager.h" 14 #include "chrome/browser/chromeos/login/wallpaper_manager.h"
14 #include "chrome/browser/chromeos/login/wizard_controller.h" 15 #include "chrome/browser/chromeos/login/wizard_controller.h"
15 #include "chrome/browser/profiles/profile_manager.h" 16 #include "chrome/browser/profiles/profile_manager.h"
16 #include "chrome/browser/ui/browser.h" 17 #include "chrome/browser/ui/browser.h"
17 #include "chrome/browser/ui/browser_finder.h" 18 #include "chrome/browser/ui/browser_finder.h"
18 #include "chrome/browser/ui/chrome_pages.h" 19 #include "chrome/browser/ui/chrome_pages.h"
19 #include "chrome/common/chrome_notification_types.h" 20 #include "chrome/common/chrome_notification_types.h"
20 #include "chrome/common/chrome_switches.h" 21 #include "chrome/common/chrome_switches.h"
21 #include "chromeos/chromeos_switches.h" 22 #include "chromeos/chromeos_switches.h"
22 #include "chromeos/login/login_state.h" 23 #include "chromeos/login/login_state.h"
(...skipping 28 matching lines...) Expand all
51 static_cast<int>(views::corewm::WINDOW_VISIBILITY_ANIMATION_TYPE_FADE); 52 static_cast<int>(views::corewm::WINDOW_VISIBILITY_ANIMATION_TYPE_FADE);
52 } 53 }
53 54
54 virtual bool ShouldShowInitialAnimation() OVERRIDE { 55 virtual bool ShouldShowInitialAnimation() OVERRIDE {
55 if (IsNormalWallpaperChange() || boot_animation_finished_) 56 if (IsNormalWallpaperChange() || boot_animation_finished_)
56 return false; 57 return false;
57 58
58 // It is a first boot case now. If kDisableBootAnimation flag 59 // It is a first boot case now. If kDisableBootAnimation flag
59 // is passed, it only disables any transition after OOBE. 60 // is passed, it only disables any transition after OOBE.
60 // |kDisableOobeAnimation| disables OOBE animation for slow hardware. 61 // |kDisableOobeAnimation| disables OOBE animation for slow hardware.
61 bool is_registered = WizardController::IsDeviceRegistered(); 62 bool is_registered = StartupUtils::IsDeviceRegistered();
62 const CommandLine* command_line = CommandLine::ForCurrentProcess(); 63 const CommandLine* command_line = CommandLine::ForCurrentProcess();
63 bool disable_boot_animation = command_line-> 64 bool disable_boot_animation = command_line->
64 HasSwitch(::switches::kDisableBootAnimation); 65 HasSwitch(::switches::kDisableBootAnimation);
65 bool disable_oobe_animation = command_line-> 66 bool disable_oobe_animation = command_line->
66 HasSwitch(::switches::kDisableOobeAnimation); 67 HasSwitch(::switches::kDisableOobeAnimation);
67 if ((!is_registered && disable_oobe_animation) || 68 if ((!is_registered && disable_oobe_animation) ||
68 (is_registered && disable_boot_animation)) 69 (is_registered && disable_boot_animation))
69 return false; 70 return false;
70 71
71 return true; 72 return true;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 DISALLOW_COPY_AND_ASSIGN(UserWallpaperDelegate); 106 DISALLOW_COPY_AND_ASSIGN(UserWallpaperDelegate);
106 }; 107 };
107 108
108 } // namespace 109 } // namespace
109 110
110 ash::UserWallpaperDelegate* CreateUserWallpaperDelegate() { 111 ash::UserWallpaperDelegate* CreateUserWallpaperDelegate() {
111 return new chromeos::UserWallpaperDelegate(); 112 return new chromeos::UserWallpaperDelegate();
112 } 113 }
113 114
114 } // namespace chromeos 115 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698