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

Side by Side Diff: ash/common/keyboard/keyboard_ui.cc

Issue 2445293002: Make the virtual keyboard show up on the display with input focus. (Closed)
Patch Set: fix one more compilation error on Windows Created 4 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 | « ash/common/keyboard/keyboard_ui.h ('k') | ash/common/shelf/shelf_layout_manager.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 2016 The Chromium Authors. All rights reserved. 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 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/common/keyboard/keyboard_ui.h" 5 #include "ash/common/keyboard/keyboard_ui.h"
6 6
7 #include "ash/common/accessibility_delegate.h" 7 #include "ash/common/accessibility_delegate.h"
8 #include "ash/common/keyboard/keyboard_ui_observer.h" 8 #include "ash/common/keyboard/keyboard_ui_observer.h"
9 #include "ash/common/system/accessibility_observer.h" 9 #include "ash/common/system/accessibility_observer.h"
10 #include "ash/common/system/tray/system_tray_notifier.h" 10 #include "ash/common/system/tray/system_tray_notifier.h"
(...skipping 12 matching lines...) Expand all
23 23
24 ~KeyboardUIImpl() override { 24 ~KeyboardUIImpl() override {
25 if (WmShell::HasInstance() && WmShell::Get()->system_tray_notifier()) 25 if (WmShell::HasInstance() && WmShell::Get()->system_tray_notifier())
26 WmShell::Get()->system_tray_notifier()->RemoveAccessibilityObserver(this); 26 WmShell::Get()->system_tray_notifier()->RemoveAccessibilityObserver(this);
27 } 27 }
28 28
29 // KeyboardUI: 29 // KeyboardUI:
30 void Show() override { 30 void Show() override {
31 keyboard::KeyboardController::GetInstance()->ShowKeyboard(true); 31 keyboard::KeyboardController::GetInstance()->ShowKeyboard(true);
32 } 32 }
33 void ShowInDisplay(const int64_t display_id) override {
34 keyboard::KeyboardController::GetInstance()->ShowKeyboardInDisplay(
35 display_id);
36 }
33 void Hide() override { 37 void Hide() override {
34 // Do nothing as this is called from ash::Shell, which also calls through 38 // Do nothing as this is called from ash::Shell, which also calls through
35 // to the appropriate keyboard functions. 39 // to the appropriate keyboard functions.
36 } 40 }
37 bool IsEnabled() override { 41 bool IsEnabled() override {
38 return WmShell::Get()->accessibility_delegate()->IsVirtualKeyboardEnabled(); 42 return WmShell::Get()->accessibility_delegate()->IsVirtualKeyboardEnabled();
39 } 43 }
40 44
41 // AccessibilityObserver: 45 // AccessibilityObserver:
42 void OnAccessibilityModeChanged( 46 void OnAccessibilityModeChanged(
(...skipping 24 matching lines...) Expand all
67 observers_.AddObserver(observer); 71 observers_.AddObserver(observer);
68 } 72 }
69 73
70 void KeyboardUI::RemoveObserver(KeyboardUIObserver* observer) { 74 void KeyboardUI::RemoveObserver(KeyboardUIObserver* observer) {
71 observers_.RemoveObserver(observer); 75 observers_.RemoveObserver(observer);
72 } 76 }
73 77
74 KeyboardUI::KeyboardUI() {} 78 KeyboardUI::KeyboardUI() {}
75 79
76 } // namespace ash 80 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/keyboard/keyboard_ui.h ('k') | ash/common/shelf/shelf_layout_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698