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

Side by Side Diff: ash/virtual_keyboard_controller.cc

Issue 2869773003: Remove unused flag 'kDisableSmartVirtualKeyboard' and associated code. (Closed)
Patch Set: Fix accidental merge in the wrong direction Created 3 years, 7 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
« no previous file with comments | « no previous file | 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/keyboard/keyboard_ui.h" 9 #include "ash/keyboard/keyboard_ui.h"
10 #include "ash/root_window_controller.h" 10 #include "ash/root_window_controller.h"
(...skipping 11 matching lines...) Expand all
22 #include "ui/events/devices/touchscreen_device.h" 22 #include "ui/events/devices/touchscreen_device.h"
23 #include "ui/keyboard/keyboard_controller.h" 23 #include "ui/keyboard/keyboard_controller.h"
24 #include "ui/keyboard/keyboard_switches.h" 24 #include "ui/keyboard/keyboard_switches.h"
25 #include "ui/keyboard/keyboard_util.h" 25 #include "ui/keyboard/keyboard_util.h"
26 26
27 namespace ash { 27 namespace ash {
28 namespace { 28 namespace {
29 29
30 // Checks whether smart deployment is enabled. 30 // Checks whether smart deployment is enabled.
31 bool IsSmartVirtualKeyboardEnabled() { 31 bool IsSmartVirtualKeyboardEnabled() {
32 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 32 return !base::CommandLine::ForCurrentProcess()->HasSwitch(
33 keyboard::switches::kEnableVirtualKeyboard)) { 33 keyboard::switches::kEnableVirtualKeyboard);
34 return false;
35 }
36 return keyboard::IsSmartDeployEnabled();
37 } 34 }
38 35
39 void MoveKeyboardToDisplayInternal(const int64_t display_id) { 36 void MoveKeyboardToDisplayInternal(const int64_t display_id) {
40 // Remove the keyboard from curent root window controller 37 // Remove the keyboard from curent root window controller
41 Shell::Get()->keyboard_ui()->Hide(); 38 Shell::Get()->keyboard_ui()->Hide();
42 RootWindowController::ForWindow( 39 RootWindowController::ForWindow(
43 keyboard::KeyboardController::GetInstance()->GetContainerWindow()) 40 keyboard::KeyboardController::GetInstance()->GetContainerWindow())
44 ->DeactivateKeyboard(keyboard::KeyboardController::GetInstance()); 41 ->DeactivateKeyboard(keyboard::KeyboardController::GetInstance());
45 42
46 for (RootWindowController* controller : 43 for (RootWindowController* controller :
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 if (is_enabled == was_enabled) 207 if (is_enabled == was_enabled)
211 return; 208 return;
212 if (is_enabled) { 209 if (is_enabled) {
213 Shell::Get()->CreateKeyboard(); 210 Shell::Get()->CreateKeyboard();
214 } else { 211 } else {
215 Shell::Get()->DeactivateKeyboard(); 212 Shell::Get()->DeactivateKeyboard();
216 } 213 }
217 } 214 }
218 215
219 } // namespace ash 216 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/virtual_keyboard_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698