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

Side by Side Diff: ash/wm/lock_state_controller_impl2.cc

Issue 23904025: Move IsRunningOnChromeOS to SysInfo (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge fix Created 7 years, 2 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
« no previous file with comments | « ash/shell.cc ('k') | ash/wm/session_state_controller_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "ash/wm/lock_state_controller_impl2.h" 5 #include "ash/wm/lock_state_controller_impl2.h"
6 6
7 #include "ash/ash_switches.h" 7 #include "ash/ash_switches.h"
8 #include "ash/cancel_mode.h" 8 #include "ash/cancel_mode.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/shell_delegate.h" 10 #include "ash/shell_delegate.h"
11 #include "ash/shell_window_ids.h" 11 #include "ash/shell_window_ids.h"
12 #include "ash/wm/session_state_animator.h" 12 #include "ash/wm/session_state_animator.h"
13 #include "base/bind_helpers.h" 13 #include "base/bind_helpers.h"
14 #include "base/command_line.h" 14 #include "base/command_line.h"
15 #include "base/sys_info.h"
15 #include "base/timer/timer.h" 16 #include "base/timer/timer.h"
16 #include "ui/aura/root_window.h" 17 #include "ui/aura/root_window.h"
17 #include "ui/compositor/layer_animation_sequence.h" 18 #include "ui/compositor/layer_animation_sequence.h"
18 #include "ui/compositor/scoped_layer_animation_settings.h" 19 #include "ui/compositor/scoped_layer_animation_settings.h"
19 #include "ui/views/corewm/compound_event_filter.h" 20 #include "ui/views/corewm/compound_event_filter.h"
20 21
21 #if defined(OS_CHROMEOS)
22 #include "base/chromeos/chromeos_version.h"
23 #endif
24
25 namespace ash { 22 namespace ash {
26 23
27 namespace { 24 namespace {
28 25
29 aura::Window* GetBackground() { 26 aura::Window* GetBackground() {
30 aura::RootWindow* root_window = Shell::GetPrimaryRootWindow(); 27 aura::RootWindow* root_window = Shell::GetPrimaryRootWindow();
31 return Shell::GetContainer(root_window, 28 return Shell::GetContainer(root_window,
32 internal::kShellWindowId_DesktopBackgroundContainer); 29 internal::kShellWindowId_DesktopBackgroundContainer);
33 } 30 }
34 31
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 real_shutdown_timer_.Start( 359 real_shutdown_timer_.Start(
363 FROM_HERE, 360 FROM_HERE,
364 duration, 361 duration,
365 this, 362 this,
366 &LockStateControllerImpl2::OnRealShutdownTimeout); 363 &LockStateControllerImpl2::OnRealShutdownTimeout);
367 } 364 }
368 365
369 void LockStateControllerImpl2::OnRealShutdownTimeout() { 366 void LockStateControllerImpl2::OnRealShutdownTimeout() {
370 DCHECK(shutting_down_); 367 DCHECK(shutting_down_);
371 #if defined(OS_CHROMEOS) 368 #if defined(OS_CHROMEOS)
372 if (!base::chromeos::IsRunningOnChromeOS()) { 369 if (!base::SysInfo::IsRunningOnChromeOS()) {
373 ShellDelegate* delegate = Shell::GetInstance()->delegate(); 370 ShellDelegate* delegate = Shell::GetInstance()->delegate();
374 if (delegate) { 371 if (delegate) {
375 delegate->Exit(); 372 delegate->Exit();
376 return; 373 return;
377 } 374 }
378 } 375 }
379 #endif 376 #endif
380 Shell::GetInstance()->delegate()->RecordUserMetricsAction( 377 Shell::GetInstance()->delegate()->RecordUserMetricsAction(
381 UMA_ACCEL_SHUT_DOWN_POWER_BUTTON); 378 UMA_ACCEL_SHUT_DOWN_POWER_BUTTON);
382 delegate_->RequestShutdown(); 379 delegate_->RequestShutdown();
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
637 unlocked_properties_->background_is_hidden) { 634 unlocked_properties_->background_is_hidden) {
638 animator_->StartAnimationWithObserver( 635 animator_->StartAnimationWithObserver(
639 internal::SessionStateAnimator::DESKTOP_BACKGROUND, 636 internal::SessionStateAnimator::DESKTOP_BACKGROUND,
640 internal::SessionStateAnimator::ANIMATION_FADE_OUT, 637 internal::SessionStateAnimator::ANIMATION_FADE_OUT,
641 speed, 638 speed,
642 observer); 639 observer);
643 } 640 }
644 } 641 }
645 642
646 } // namespace ash 643 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shell.cc ('k') | ash/wm/session_state_controller_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698