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

Side by Side Diff: ash/virtual_keyboard_controller.cc

Issue 820073009: Re-enables smart deploy by default. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 5 years, 11 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
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"
(...skipping 10 matching lines...) Expand all
21 21
22 namespace ash { 22 namespace ash {
23 namespace { 23 namespace {
24 24
25 // Checks whether smart deployment is enabled. 25 // Checks whether smart deployment is enabled.
26 bool IsSmartVirtualKeyboardEnabled() { 26 bool IsSmartVirtualKeyboardEnabled() {
27 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 27 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
28 keyboard::switches::kEnableVirtualKeyboard)) { 28 keyboard::switches::kEnableVirtualKeyboard)) {
29 return false; 29 return false;
30 } 30 }
31 return base::CommandLine::ForCurrentProcess()->HasSwitch( 31 return !base::CommandLine::ForCurrentProcess()->HasSwitch(
32 keyboard::switches::kEnableAutoVirtualKeyboard); 32 keyboard::switches::kDisableSmartVirtualKeyboard);
33 } 33 }
34 34
35 } // namespace 35 } // namespace
36 36
37 VirtualKeyboardController::VirtualKeyboardController() 37 VirtualKeyboardController::VirtualKeyboardController()
38 : has_external_keyboard_(false), 38 : has_external_keyboard_(false),
39 has_internal_keyboard_(false), 39 has_internal_keyboard_(false),
40 has_touchscreen_(false), 40 has_touchscreen_(false),
41 ignore_external_keyboard_(false) { 41 ignore_external_keyboard_(false) {
42 Shell::GetInstance()->AddShellObserver(this); 42 Shell::GetInstance()->AddShellObserver(this);
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 keyboard::SetTouchKeyboardEnabled(enabled); 116 keyboard::SetTouchKeyboardEnabled(enabled);
117 if (enabled) { 117 if (enabled) {
118 Shell::GetInstance()->CreateKeyboard(); 118 Shell::GetInstance()->CreateKeyboard();
119 } else { 119 } else {
120 if (!keyboard::IsKeyboardEnabled()) 120 if (!keyboard::IsKeyboardEnabled())
121 Shell::GetInstance()->DeactivateKeyboard(); 121 Shell::GetInstance()->DeactivateKeyboard();
122 } 122 }
123 } 123 }
124 124
125 } // namespace ash 125 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/ime/tray_ime_chromeos_unittest.cc ('k') | ash/virtual_keyboard_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698