OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "ui/events/test/keyboard_layout.h" |
| 6 |
| 7 #if defined(OS_WIN) || defined(OS_MACOSX) |
| 8 #include "base/logging.h" |
| 9 |
| 10 namespace ui { |
| 11 |
| 12 ScopedKeyboardLayout::ScopedKeyboardLayout(KeyboardLayout layout) { |
| 13 original_layout_ = GetActiveLayout(); |
| 14 ActivateLayout(GetPlatformKeyboardLayout(layout)); |
| 15 } |
| 16 |
| 17 ScopedKeyboardLayout::~ScopedKeyboardLayout() { |
| 18 ActivateLayout(original_layout_); |
| 19 } |
| 20 |
| 21 } // namespace ui |
| 22 |
| 23 #endif // defined(OS_WIN) || defined(OS_MACOSX) |
OLD | NEW |