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

Side by Side Diff: chrome/browser/ui/ash/event_rewriter.cc

Issue 14820030: Move Chrome OS switches to chromeos/chromeos_switches.cc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix nits Created 7 years, 7 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/ui/ash/event_rewriter.h" 5 #include "chrome/browser/ui/ash/event_rewriter.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 13 matching lines...) Expand all
24 24
25 // Get rid of a macro from Xlib.h that conflicts with OwnershipService class. 25 // Get rid of a macro from Xlib.h that conflicts with OwnershipService class.
26 #undef Status 26 #undef Status
27 27
28 #include "base/chromeos/chromeos_version.h" 28 #include "base/chromeos/chromeos_version.h"
29 #include "base/command_line.h" 29 #include "base/command_line.h"
30 #include "chrome/browser/chromeos/input_method/input_method_configuration.h" 30 #include "chrome/browser/chromeos/input_method/input_method_configuration.h"
31 #include "chrome/browser/chromeos/login/login_display_host_impl.h" 31 #include "chrome/browser/chromeos/login/login_display_host_impl.h"
32 #include "chrome/browser/chromeos/login/user_manager.h" 32 #include "chrome/browser/chromeos/login/user_manager.h"
33 #include "chrome/browser/chromeos/xinput_hierarchy_changed_event_listener.h" 33 #include "chrome/browser/chromeos/xinput_hierarchy_changed_event_listener.h"
34 #include "chrome/common/chrome_switches.h"
35 #include "chrome/common/pref_names.h" 34 #include "chrome/common/pref_names.h"
35 #include "chromeos/chromeos_switches.h"
36 #include "chromeos/ime/input_method_manager.h" 36 #include "chromeos/ime/input_method_manager.h"
37 #include "chromeos/ime/xkeyboard.h" 37 #include "chromeos/ime/xkeyboard.h"
38 #include "ui/base/keycodes/keyboard_code_conversion_x.h" 38 #include "ui/base/keycodes/keyboard_code_conversion_x.h"
39 #include "ui/base/x/x11_util.h" 39 #include "ui/base/x/x11_util.h"
40 40
41 using chromeos::input_method::GetInputMethodManager; 41 using chromeos::input_method::GetInputMethodManager;
42 #endif 42 #endif
43 43
44 namespace { 44 namespace {
45 45
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 case XK_Super_R: 112 case XK_Super_R:
113 return true; 113 return true;
114 default: 114 default:
115 break; 115 break;
116 } 116 }
117 return false; 117 return false;
118 } 118 }
119 119
120 bool HasDiamondKey() { 120 bool HasDiamondKey() {
121 return CommandLine::ForCurrentProcess()->HasSwitch( 121 return CommandLine::ForCurrentProcess()->HasSwitch(
122 switches::kHasChromeOSDiamondKey); 122 chromeos::switches::kHasChromeOSDiamondKey);
123 } 123 }
124 124
125 bool IsMod3UsedByCurrentInputMethod() { 125 bool IsMod3UsedByCurrentInputMethod() {
126 // Since both German Neo2 XKB layout and Caps Lock depend on Mod3Mask, 126 // Since both German Neo2 XKB layout and Caps Lock depend on Mod3Mask,
127 // it's not possible to make both features work. For now, we don't remap 127 // it's not possible to make both features work. For now, we don't remap
128 // Mod3Mask when Neo2 is in use. 128 // Mod3Mask when Neo2 is in use.
129 // TODO(yusukes): Remove the restriction. 129 // TODO(yusukes): Remove the restriction.
130 return GetInputMethodManager()->GetCurrentInputMethod().id() == kNeo2LayoutId; 130 return GetInputMethodManager()->GetCurrentInputMethod().id() == kNeo2LayoutId;
131 } 131 }
132 #endif 132 #endif
(...skipping 866 matching lines...) Expand 10 before | Expand all | Expand 10 after
999 const DeviceType type = EventRewriter::GetDeviceType(device_name); 999 const DeviceType type = EventRewriter::GetDeviceType(device_name);
1000 if (type == kDeviceAppleKeyboard) { 1000 if (type == kDeviceAppleKeyboard) {
1001 VLOG(1) << "Apple keyboard '" << device_name << "' connected: " 1001 VLOG(1) << "Apple keyboard '" << device_name << "' connected: "
1002 << "id=" << device_id; 1002 << "id=" << device_id;
1003 } 1003 }
1004 // Always overwrite the existing device_id since the X server may reuse a 1004 // Always overwrite the existing device_id since the X server may reuse a
1005 // device id for an unattached device. 1005 // device id for an unattached device.
1006 device_id_to_type_[device_id] = type; 1006 device_id_to_type_[device_id] = type;
1007 return type; 1007 return type;
1008 } 1008 }
OLDNEW
« no previous file with comments | « chrome/browser/prefs/command_line_pref_store.cc ('k') | chrome/browser/ui/ash/event_rewriter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698