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

Side by Side Diff: ash/virtual_keyboard_controller.cc

Issue 2761063002: Move more from WmShell to Shell (Closed)
Patch Set: merge Created 3 years, 9 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 | « ash/test/status_area_widget_test_helper.cc ('k') | ash/wm/window_cycle_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/common/keyboard/keyboard_ui.h" 9 #include "ash/common/keyboard/keyboard_ui.h"
10 #include "ash/common/system/tray/system_tray_notifier.h" 10 #include "ash/common/system/tray/system_tray_notifier.h"
(...skipping 20 matching lines...) Expand all
31 bool IsSmartVirtualKeyboardEnabled() { 31 bool IsSmartVirtualKeyboardEnabled() {
32 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 32 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
33 keyboard::switches::kEnableVirtualKeyboard)) { 33 keyboard::switches::kEnableVirtualKeyboard)) {
34 return false; 34 return false;
35 } 35 }
36 return keyboard::IsSmartDeployEnabled(); 36 return keyboard::IsSmartDeployEnabled();
37 } 37 }
38 38
39 void MoveKeyboardToDisplayInternal(const int64_t display_id) { 39 void MoveKeyboardToDisplayInternal(const int64_t display_id) {
40 // Remove the keyboard from curent root window controller 40 // Remove the keyboard from curent root window controller
41 WmShell::Get()->keyboard_ui()->Hide(); 41 Shell::Get()->keyboard_ui()->Hide();
42 RootWindowController::ForWindow( 42 RootWindowController::ForWindow(
43 keyboard::KeyboardController::GetInstance()->GetContainerWindow()) 43 keyboard::KeyboardController::GetInstance()->GetContainerWindow())
44 ->DeactivateKeyboard(keyboard::KeyboardController::GetInstance()); 44 ->DeactivateKeyboard(keyboard::KeyboardController::GetInstance());
45 45
46 for (RootWindowController* controller : 46 for (RootWindowController* controller :
47 Shell::GetInstance()->GetAllRootWindowControllers()) { 47 Shell::GetInstance()->GetAllRootWindowControllers()) {
48 if (display::Screen::GetScreen() 48 if (display::Screen::GetScreen()
49 ->GetDisplayNearestWindow(controller->GetRootWindow()) 49 ->GetDisplayNearestWindow(controller->GetRootWindow())
50 .id() == display_id) { 50 .id() == display_id) {
51 controller->ActivateKeyboard(keyboard::KeyboardController::GetInstance()); 51 controller->ActivateKeyboard(keyboard::KeyboardController::GetInstance());
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 if (is_enabled == was_enabled) 212 if (is_enabled == was_enabled)
213 return; 213 return;
214 if (is_enabled) { 214 if (is_enabled) {
215 Shell::GetInstance()->CreateKeyboard(); 215 Shell::GetInstance()->CreateKeyboard();
216 } else { 216 } else {
217 Shell::GetInstance()->DeactivateKeyboard(); 217 Shell::GetInstance()->DeactivateKeyboard();
218 } 218 }
219 } 219 }
220 220
221 } // namespace ash 221 } // namespace ash
OLDNEW
« no previous file with comments | « ash/test/status_area_widget_test_helper.cc ('k') | ash/wm/window_cycle_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698