| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/chromeos/input_method/xkeyboard.h" | 5 #include "chrome/browser/chromeos/input_method/xkeyboard.h" |
| 6 | 6 |
| 7 #include <queue> | 7 #include <queue> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| 11 | 11 |
| 12 #include <X11/XKBlib.h> |
| 13 #include <X11/Xlib.h> |
| 14 #include <glib.h> |
| 12 #include <stdlib.h> | 15 #include <stdlib.h> |
| 13 #include <string.h> | 16 #include <string.h> |
| 14 | 17 |
| 15 #include "base/logging.h" | 18 #include "base/logging.h" |
| 16 #include "base/memory/scoped_ptr.h" | 19 #include "base/memory/scoped_ptr.h" |
| 17 #include "base/process_util.h" | 20 #include "base/process_util.h" |
| 18 #include "base/string_util.h" | 21 #include "base/string_util.h" |
| 19 #include "base/stringprintf.h" | 22 #include "base/stringprintf.h" |
| 20 #include "chrome/browser/chromeos/input_method/input_method_util.h" | 23 #include "chrome/browser/chromeos/input_method/input_method_util.h" |
| 21 #include "chrome/browser/chromeos/system/runtime_environment.h" | 24 #include "chrome/browser/chromeos/system/runtime_environment.h" |
| 22 #include "content/public/browser/browser_thread.h" | 25 #include "content/public/browser/browser_thread.h" |
| 23 #include "ui/base/x/x11_util.h" | 26 #include "ui/base/x/x11_util.h" |
| 24 | 27 |
| 25 // These includes conflict with base/tracked_objects.h so must come last. | |
| 26 #include <X11/XKBlib.h> | |
| 27 #include <X11/Xlib.h> | |
| 28 #include <glib.h> | |
| 29 | |
| 30 using content::BrowserThread; | 28 using content::BrowserThread; |
| 31 | 29 |
| 32 namespace chromeos { | 30 namespace chromeos { |
| 33 namespace input_method { | 31 namespace input_method { |
| 34 namespace { | 32 namespace { |
| 35 | 33 |
| 36 // The default keyboard layout name in the xorg config file. | 34 // The default keyboard layout name in the xorg config file. |
| 37 const char kDefaultLayoutName[] = "us"; | 35 const char kDefaultLayoutName[] = "us"; |
| 38 | 36 |
| 39 // The command we use to set the current XKB layout and modifier key mapping. | 37 // The command we use to set the current XKB layout and modifier key mapping. |
| (...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 533 case kCapsLockKey: | 531 case kCapsLockKey: |
| 534 return "capslock"; | 532 return "capslock"; |
| 535 case kNumModifierKeys: | 533 case kNumModifierKeys: |
| 536 break; | 534 break; |
| 537 } | 535 } |
| 538 return ""; | 536 return ""; |
| 539 } | 537 } |
| 540 | 538 |
| 541 } // namespace input_method | 539 } // namespace input_method |
| 542 } // namespace chromeos | 540 } // namespace chromeos |
| OLD | NEW |