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

Side by Side Diff: ash/accelerators/accelerator_controller.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 | « no previous file | ash/display/display_controller.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 (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/accelerators/accelerator_controller.h" 5 #include "ash/accelerators/accelerator_controller.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <iostream> 9 #include <iostream>
10 #include <string> 10 #include <string>
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 #include "ui/events/keycodes/keyboard_codes.h" 63 #include "ui/events/keycodes/keyboard_codes.h"
64 #include "ui/gfx/screen.h" 64 #include "ui/gfx/screen.h"
65 #include "ui/oak/oak.h" 65 #include "ui/oak/oak.h"
66 #include "ui/views/controls/webview/webview.h" 66 #include "ui/views/controls/webview/webview.h"
67 #include "ui/views/debug_utils.h" 67 #include "ui/views/debug_utils.h"
68 #include "ui/views/widget/widget.h" 68 #include "ui/views/widget/widget.h"
69 69
70 #if defined(OS_CHROMEOS) 70 #if defined(OS_CHROMEOS)
71 #include "ash/session_state_delegate.h" 71 #include "ash/session_state_delegate.h"
72 #include "ash/system/chromeos/keyboard_brightness_controller.h" 72 #include "ash/system/chromeos/keyboard_brightness_controller.h"
73 #include "base/chromeos/chromeos_version.h" 73 #include "base/sys_info.h"
74 #endif // defined(OS_CHROMEOS) 74 #endif // defined(OS_CHROMEOS)
75 75
76 namespace ash { 76 namespace ash {
77 namespace { 77 namespace {
78 78
79 using internal::DisplayInfo; 79 using internal::DisplayInfo;
80 80
81 bool DebugShortcutsEnabled() { 81 bool DebugShortcutsEnabled() {
82 #if defined(NDEBUG) 82 #if defined(NDEBUG)
83 return CommandLine::ForCurrentProcess()->HasSwitch( 83 return CommandLine::ForCurrentProcess()->HasSwitch(
(...skipping 810 matching lines...) Expand 10 before | Expand all | Expand 10 after
894 return HandleMagnifyScreen(-1); 894 return HandleMagnifyScreen(-1);
895 case MEDIA_NEXT_TRACK: 895 case MEDIA_NEXT_TRACK:
896 return HandleMediaNextTrack(); 896 return HandleMediaNextTrack();
897 case MEDIA_PLAY_PAUSE: 897 case MEDIA_PLAY_PAUSE:
898 return HandleMediaPlayPause(); 898 return HandleMediaPlayPause();
899 case MEDIA_PREV_TRACK: 899 case MEDIA_PREV_TRACK:
900 return HandleMediaPrevTrack(); 900 return HandleMediaPrevTrack();
901 case POWER_PRESSED: // fallthrough 901 case POWER_PRESSED: // fallthrough
902 case POWER_RELEASED: 902 case POWER_RELEASED:
903 #if defined(OS_CHROMEOS) 903 #if defined(OS_CHROMEOS)
904 if (!base::chromeos::IsRunningOnChromeOS()) { 904 if (!base::SysInfo::IsRunningOnChromeOS()) {
905 // There is no powerd in linux desktop, so call the 905 // There is no powerd in linux desktop, so call the
906 // PowerButtonController here. 906 // PowerButtonController here.
907 Shell::GetInstance()->power_button_controller()-> 907 Shell::GetInstance()->power_button_controller()->
908 OnPowerButtonEvent(action == POWER_PRESSED, base::TimeTicks()); 908 OnPowerButtonEvent(action == POWER_PRESSED, base::TimeTicks());
909 } 909 }
910 #endif 910 #endif
911 // We don't do anything with these at present on the device, 911 // We don't do anything with these at present on the device,
912 // (power button events are reported to us from powerm via 912 // (power button events are reported to us from powerm via
913 // D-BUS), but we consume them to prevent them from getting 913 // D-BUS), but we consume them to prevent them from getting
914 // passed to apps -- see http://crbug.com/146609. 914 // passed to apps -- see http://crbug.com/146609.
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
981 keyboard_brightness_control_delegate) { 981 keyboard_brightness_control_delegate) {
982 keyboard_brightness_control_delegate_ = 982 keyboard_brightness_control_delegate_ =
983 keyboard_brightness_control_delegate.Pass(); 983 keyboard_brightness_control_delegate.Pass();
984 } 984 }
985 985
986 bool AcceleratorController::CanHandleAccelerators() const { 986 bool AcceleratorController::CanHandleAccelerators() const {
987 return true; 987 return true;
988 } 988 }
989 989
990 } // namespace ash 990 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/display/display_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698