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

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

Issue 13590004: Revert 192504 "Re-apply 192420: Move login switches to src/chromeos" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: 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/user_manager.h" 13 #include "chrome/browser/chromeos/login/user_manager.h"
14 #include "chrome/browser/chromeos/login/wallpaper_manager.h" 14 #include "chrome/browser/chromeos/login/wallpaper_manager.h"
15 #include "chrome/browser/chromeos/login/wizard_controller.h" 15 #include "chrome/browser/chromeos/login/wizard_controller.h"
16 #include "chrome/browser/profiles/profile_manager.h" 16 #include "chrome/browser/profiles/profile_manager.h"
17 #include "chrome/browser/ui/browser.h" 17 #include "chrome/browser/ui/browser.h"
18 #include "chrome/browser/ui/browser_finder.h" 18 #include "chrome/browser/ui/browser_finder.h"
19 #include "chrome/browser/ui/chrome_pages.h" 19 #include "chrome/browser/ui/chrome_pages.h"
20 #include "chrome/common/chrome_notification_types.h" 20 #include "chrome/common/chrome_notification_types.h"
21 #include "chrome/common/chrome_switches.h" 21 #include "chrome/common/chrome_switches.h"
22 #include "chromeos/chromeos_switches.h"
23 #include "content/public/browser/notification_service.h" 22 #include "content/public/browser/notification_service.h"
24 23
25 namespace chromeos { 24 namespace chromeos {
26 25
27 namespace { 26 namespace {
28 27
29 bool IsNormalWallpaperChange() { 28 bool IsNormalWallpaperChange() {
30 if (chromeos::UserManager::Get()->IsUserLoggedIn() || 29 if (chromeos::UserManager::Get()->IsUserLoggedIn() ||
31 !CommandLine::ForCurrentProcess()->HasSwitch(switches::kFirstBoot) || 30 !CommandLine::ForCurrentProcess()->HasSwitch(switches::kFirstBoot) ||
32 WizardController::IsZeroDelayEnabled() || 31 WizardController::IsZeroDelayEnabled() ||
(...skipping 21 matching lines...) Expand all
54 virtual bool ShouldShowInitialAnimation() OVERRIDE { 53 virtual bool ShouldShowInitialAnimation() OVERRIDE {
55 if (IsNormalWallpaperChange() || boot_animation_finished_) 54 if (IsNormalWallpaperChange() || boot_animation_finished_)
56 return false; 55 return false;
57 56
58 // It is a first boot case now. If kDisableBootAnimation flag 57 // It is a first boot case now. If kDisableBootAnimation flag
59 // is passed, it only disables any transition after OOBE. 58 // is passed, it only disables any transition after OOBE.
60 // |kDisableOobeAnimation| disables OOBE animation for slow hardware. 59 // |kDisableOobeAnimation| disables OOBE animation for slow hardware.
61 bool is_registered = WizardController::IsDeviceRegistered(); 60 bool is_registered = WizardController::IsDeviceRegistered();
62 const CommandLine* command_line = CommandLine::ForCurrentProcess(); 61 const CommandLine* command_line = CommandLine::ForCurrentProcess();
63 bool disable_boot_animation = command_line-> 62 bool disable_boot_animation = command_line->
64 HasSwitch(::switches::kDisableBootAnimation); 63 HasSwitch(switches::kDisableBootAnimation);
65 bool disable_oobe_animation = command_line-> 64 bool disable_oobe_animation = command_line->
66 HasSwitch(::switches::kDisableOobeAnimation); 65 HasSwitch(switches::kDisableOobeAnimation);
67 if ((!is_registered && disable_oobe_animation) || 66 if ((!is_registered && disable_oobe_animation) ||
68 (is_registered && disable_boot_animation)) 67 (is_registered && disable_boot_animation))
69 return false; 68 return false;
70 69
71 return true; 70 return true;
72 } 71 }
73 72
74 virtual void UpdateWallpaper() OVERRIDE { 73 virtual void UpdateWallpaper() OVERRIDE {
75 chromeos::WallpaperManager::Get()->UpdateWallpaper(); 74 chromeos::WallpaperManager::Get()->UpdateWallpaper();
76 } 75 }
(...skipping 28 matching lines...) Expand all
105 DISALLOW_COPY_AND_ASSIGN(UserWallpaperDelegate); 104 DISALLOW_COPY_AND_ASSIGN(UserWallpaperDelegate);
106 }; 105 };
107 106
108 } // namespace 107 } // namespace
109 108
110 ash::UserWallpaperDelegate* CreateUserWallpaperDelegate() { 109 ash::UserWallpaperDelegate* CreateUserWallpaperDelegate() {
111 return new chromeos::UserWallpaperDelegate(); 110 return new chromeos::UserWallpaperDelegate();
112 } 111 }
113 112
114 } // namespace chromeos 113 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698