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

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: . Created 7 years, 3 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') | base/sys_info.h » ('J')
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/event.h" 63 #include "ui/events/event.h"
64 #include "ui/events/keycodes/keyboard_codes.h" 64 #include "ui/events/keycodes/keyboard_codes.h"
65 #include "ui/gfx/screen.h" 65 #include "ui/gfx/screen.h"
66 #include "ui/oak/oak.h" 66 #include "ui/oak/oak.h"
67 #include "ui/views/controls/webview/webview.h" 67 #include "ui/views/controls/webview/webview.h"
68 #include "ui/views/debug_utils.h" 68 #include "ui/views/debug_utils.h"
69 #include "ui/views/widget/widget.h" 69 #include "ui/views/widget/widget.h"
70 70
71 #if defined(OS_CHROMEOS) 71 #if defined(OS_CHROMEOS)
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 819 matching lines...) Expand 10 before | Expand all | Expand 10 after
903 return HandleMagnifyScreen(-1); 903 return HandleMagnifyScreen(-1);
904 case MEDIA_NEXT_TRACK: 904 case MEDIA_NEXT_TRACK:
905 return HandleMediaNextTrack(); 905 return HandleMediaNextTrack();
906 case MEDIA_PLAY_PAUSE: 906 case MEDIA_PLAY_PAUSE:
907 return HandleMediaPlayPause(); 907 return HandleMediaPlayPause();
908 case MEDIA_PREV_TRACK: 908 case MEDIA_PREV_TRACK:
909 return HandleMediaPrevTrack(); 909 return HandleMediaPrevTrack();
910 case POWER_PRESSED: // fallthrough 910 case POWER_PRESSED: // fallthrough
911 case POWER_RELEASED: 911 case POWER_RELEASED:
912 #if defined(OS_CHROMEOS) 912 #if defined(OS_CHROMEOS)
913 if (!base::chromeos::IsRunningOnChromeOS()) { 913 if (!base::SysInfo::IsRunningOnChromeOS()) {
914 // There is no powerd in linux desktop, so call the 914 // There is no powerd in linux desktop, so call the
915 // PowerButtonController here. 915 // PowerButtonController here.
916 Shell::GetInstance()->power_button_controller()-> 916 Shell::GetInstance()->power_button_controller()->
917 OnPowerButtonEvent(action == POWER_PRESSED, base::TimeTicks()); 917 OnPowerButtonEvent(action == POWER_PRESSED, base::TimeTicks());
918 } 918 }
919 #endif 919 #endif
920 // We don't do anything with these at present on the device, 920 // We don't do anything with these at present on the device,
921 // (power button events are reported to us from powerm via 921 // (power button events are reported to us from powerm via
922 // D-BUS), but we consume them to prevent them from getting 922 // D-BUS), but we consume them to prevent them from getting
923 // passed to apps -- see http://crbug.com/146609. 923 // passed to apps -- see http://crbug.com/146609.
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
990 keyboard_brightness_control_delegate) { 990 keyboard_brightness_control_delegate) {
991 keyboard_brightness_control_delegate_ = 991 keyboard_brightness_control_delegate_ =
992 keyboard_brightness_control_delegate.Pass(); 992 keyboard_brightness_control_delegate.Pass();
993 } 993 }
994 994
995 bool AcceleratorController::CanHandleAccelerators() const { 995 bool AcceleratorController::CanHandleAccelerators() const {
996 return true; 996 return true;
997 } 997 }
998 998
999 } // namespace ash 999 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/display/display_controller.cc » ('j') | base/sys_info.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698