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

Side by Side Diff: ash/wm/session_state_controller_impl.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/wm/lock_state_controller_impl2.cc ('k') | base/base.gypi » ('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 (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 "ash/wm/session_state_controller_impl.h" 5 #include "ash/wm/session_state_controller_impl.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/command_line.h" 13 #include "base/command_line.h"
14 #include "base/sys_info.h"
14 #include "ui/aura/root_window.h" 15 #include "ui/aura/root_window.h"
15 #include "ui/views/corewm/compound_event_filter.h" 16 #include "ui/views/corewm/compound_event_filter.h"
16 17
17 #if defined(OS_CHROMEOS)
18 #include "base/chromeos/chromeos_version.h"
19 #endif
20
21 namespace ash { 18 namespace ash {
22 19
23 SessionStateControllerImpl::TestApi::TestApi( 20 SessionStateControllerImpl::TestApi::TestApi(
24 SessionStateControllerImpl* controller) 21 SessionStateControllerImpl* controller)
25 : controller_(controller) { 22 : controller_(controller) {
26 } 23 }
27 24
28 SessionStateControllerImpl::TestApi::~TestApi() { 25 SessionStateControllerImpl::TestApi::~TestApi() {
29 } 26 }
30 27
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 311
315 real_shutdown_timer_.Start( 312 real_shutdown_timer_.Start(
316 FROM_HERE, 313 FROM_HERE,
317 duration, 314 duration,
318 this, &SessionStateControllerImpl::OnRealShutdownTimeout); 315 this, &SessionStateControllerImpl::OnRealShutdownTimeout);
319 } 316 }
320 317
321 void SessionStateControllerImpl::OnRealShutdownTimeout() { 318 void SessionStateControllerImpl::OnRealShutdownTimeout() {
322 DCHECK(shutting_down_); 319 DCHECK(shutting_down_);
323 #if defined(OS_CHROMEOS) 320 #if defined(OS_CHROMEOS)
324 if (!base::chromeos::IsRunningOnChromeOS()) { 321 if (!base::SysInfo::IsRunningOnChromeOS()) {
325 ShellDelegate* delegate = Shell::GetInstance()->delegate(); 322 ShellDelegate* delegate = Shell::GetInstance()->delegate();
326 if (delegate) { 323 if (delegate) {
327 delegate->Exit(); 324 delegate->Exit();
328 return; 325 return;
329 } 326 }
330 } 327 }
331 #endif 328 #endif
332 delegate_->RequestShutdown(); 329 delegate_->RequestShutdown();
333 } 330 }
334 331
335 void SessionStateControllerImpl::OnLockScreenHide(base::Closure& callback) { 332 void SessionStateControllerImpl::OnLockScreenHide(base::Closure& callback) {
336 callback.Run(); 333 callback.Run();
337 } 334 }
338 335
339 void SessionStateControllerImpl::SetLockScreenDisplayedCallback( 336 void SessionStateControllerImpl::SetLockScreenDisplayedCallback(
340 base::Closure& callback) { 337 base::Closure& callback) {
341 NOTIMPLEMENTED(); 338 NOTIMPLEMENTED();
342 } 339 }
343 340
344 } // namespace ash 341 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/lock_state_controller_impl2.cc ('k') | base/base.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698