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

Side by Side Diff: chromeos/ime/xkeyboard.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 | « chromeos/ime/ibus_daemon_controller.cc ('k') | chromeos/login/login_state.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 "chromeos/ime/xkeyboard.h" 5 #include "chromeos/ime/xkeyboard.h"
6 6
7 #include <cstdlib> 7 #include <cstdlib>
8 #include <cstring> 8 #include <cstring>
9 #include <queue> 9 #include <queue>
10 #include <set> 10 #include <set>
11 #include <utility> 11 #include <utility>
12 12
13 #include "base/chromeos/chromeos_version.h"
14 #include "base/logging.h" 13 #include "base/logging.h"
15 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
16 #include "base/message_loop/message_loop.h" 15 #include "base/message_loop/message_loop.h"
16 #include "base/process/launch.h"
17 #include "base/process/process_handle.h" 17 #include "base/process/process_handle.h"
18 #include "base/process/launch.h"
19 #include "base/strings/string_util.h" 18 #include "base/strings/string_util.h"
20 #include "base/strings/stringprintf.h" 19 #include "base/strings/stringprintf.h"
20 #include "base/sys_info.h"
21 #include "base/threading/thread_checker.h" 21 #include "base/threading/thread_checker.h"
22 22
23 // These includes conflict with base/tracked_objects.h so must come last. 23 // These includes conflict with base/tracked_objects.h so must come last.
24 #include <X11/XKBlib.h> 24 #include <X11/XKBlib.h>
25 #include <X11/Xlib.h> 25 #include <X11/Xlib.h>
26 #include <glib.h> 26 #include <glib.h>
27 27
28 namespace chromeos { 28 namespace chromeos {
29 namespace input_method { 29 namespace input_method {
30 namespace { 30 namespace {
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 107
108 // A queue for executing setxkbmap one by one. 108 // A queue for executing setxkbmap one by one.
109 std::queue<std::string> execute_queue_; 109 std::queue<std::string> execute_queue_;
110 110
111 base::ThreadChecker thread_checker_; 111 base::ThreadChecker thread_checker_;
112 112
113 DISALLOW_COPY_AND_ASSIGN(XKeyboardImpl); 113 DISALLOW_COPY_AND_ASSIGN(XKeyboardImpl);
114 }; 114 };
115 115
116 XKeyboardImpl::XKeyboardImpl() 116 XKeyboardImpl::XKeyboardImpl()
117 : is_running_on_chrome_os_(base::chromeos::IsRunningOnChromeOS()) { 117 : is_running_on_chrome_os_(base::SysInfo::IsRunningOnChromeOS()) {
118 num_lock_mask_ = GetNumLockMask(); 118 num_lock_mask_ = GetNumLockMask();
119 119
120 // web_input_event_aurax11.cc seems to assume that Mod2Mask is always assigned 120 // web_input_event_aurax11.cc seems to assume that Mod2Mask is always assigned
121 // to Num Lock. 121 // to Num Lock.
122 // TODO(yusukes): Check the assumption is really okay. If not, modify the Aura 122 // TODO(yusukes): Check the assumption is really okay. If not, modify the Aura
123 // code, and then remove the CHECK below. 123 // code, and then remove the CHECK below.
124 CHECK(!is_running_on_chrome_os_ || (num_lock_mask_ == Mod2Mask)); 124 CHECK(!is_running_on_chrome_os_ || (num_lock_mask_ == Mod2Mask));
125 GetLockedModifiers(&current_caps_lock_status_, &current_num_lock_status_); 125 GetLockedModifiers(&current_caps_lock_status_, &current_num_lock_status_);
126 } 126 }
127 127
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 return CheckLayoutName(layout_name); 370 return CheckLayoutName(layout_name);
371 } 371 }
372 372
373 // static 373 // static
374 XKeyboard* XKeyboard::Create() { 374 XKeyboard* XKeyboard::Create() {
375 return new XKeyboardImpl(); 375 return new XKeyboardImpl();
376 } 376 }
377 377
378 } // namespace input_method 378 } // namespace input_method
379 } // namespace chromeos 379 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/ime/ibus_daemon_controller.cc ('k') | chromeos/login/login_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698