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

Side by Side Diff: ash/virtual_keyboard_controller.cc

Issue 825473002: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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
« no previous file with comments | « android_webview/lib/main/webview_tests.cc ('k') | ash/virtual_keyboard_controller_unittest.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/virtual_keyboard_controller.h" 5 #include "ash/virtual_keyboard_controller.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/wm/maximize_mode/maximize_mode_controller.h" 10 #include "ash/wm/maximize_mode/maximize_mode_controller.h"
11 #include "base/command_line.h" 11 #include "base/command_line.h"
12 #include "base/strings/string_util.h" 12 #include "base/strings/string_util.h"
13 #include "ui/events/devices/device_data_manager.h" 13 #include "ui/events/devices/device_data_manager.h"
14 #include "ui/events/devices/input_device.h" 14 #include "ui/events/devices/input_device.h"
15 #include "ui/events/devices/keyboard_device.h" 15 #include "ui/events/devices/keyboard_device.h"
16 #include "ui/events/devices/touchscreen_device.h" 16 #include "ui/events/devices/touchscreen_device.h"
17 #include "ui/gfx/x/x11_types.h" 17 #include "ui/gfx/x/x11_types.h"
18 #include "ui/keyboard/keyboard_switches.h" 18 #include "ui/keyboard/keyboard_switches.h"
19 #include "ui/keyboard/keyboard_util.h" 19 #include "ui/keyboard/keyboard_util.h"
20 20
21 namespace ash { 21 namespace ash {
22 namespace { 22 namespace {
23 23
24 // Checks whether smart deployment is enabled. 24 // Checks whether smart deployment is enabled.
25 bool IsSmartVirtualKeyboardEnabled() { 25 bool IsSmartVirtualKeyboardEnabled() {
26 return !CommandLine::ForCurrentProcess()->HasSwitch( 26 return !base::CommandLine::ForCurrentProcess()->HasSwitch(
27 keyboard::switches::kDisableSmartVirtualKeyboard); 27 keyboard::switches::kDisableSmartVirtualKeyboard);
28 } 28 }
29 29
30 } // namespace 30 } // namespace
31 31
32 VirtualKeyboardController::VirtualKeyboardController() 32 VirtualKeyboardController::VirtualKeyboardController()
33 : has_external_keyboard_(false), 33 : has_external_keyboard_(false),
34 has_internal_keyboard_(false), 34 has_internal_keyboard_(false),
35 has_touchscreen_(false), 35 has_touchscreen_(false),
36 ignore_external_keyboard_(false) { 36 ignore_external_keyboard_(false) {
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 keyboard::SetTouchKeyboardEnabled(enabled); 111 keyboard::SetTouchKeyboardEnabled(enabled);
112 if (enabled) { 112 if (enabled) {
113 Shell::GetInstance()->CreateKeyboard(); 113 Shell::GetInstance()->CreateKeyboard();
114 } else { 114 } else {
115 if (!keyboard::IsKeyboardEnabled()) 115 if (!keyboard::IsKeyboardEnabled())
116 Shell::GetInstance()->DeactivateKeyboard(); 116 Shell::GetInstance()->DeactivateKeyboard();
117 } 117 }
118 } 118 }
119 119
120 } // namespace ash 120 } // namespace ash
OLDNEW
« no previous file with comments | « android_webview/lib/main/webview_tests.cc ('k') | ash/virtual_keyboard_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698