1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #include "ash/keyboard/ui/keyboard_ui.h"
6 
7 #include "ash/keyboard/ui/keyboard_ui_controller.h"
8 #include "base/command_line.h"
9 #include "base/logging.h"
10 #include "base/unguessable_token.h"
11 #include "ui/aura/window.h"
12 #include "ui/base/ime/input_method.h"
13 #include "ui/base/ime/text_input_client.h"
14 #include "ui/base/ui_base_switches.h"
15 #include "ui/gfx/geometry/size.h"
16 
17 namespace keyboard {
18 
19 KeyboardUI::KeyboardUI() = default;
20 
21 KeyboardUI::~KeyboardUI() = default;
22 
ShowKeyboardWindow()23 void KeyboardUI::ShowKeyboardWindow() {
24   DVLOG(1) << "ShowKeyboardWindow";
25   aura::Window* window = GetKeyboardWindow();
26   if (window) {
27     TRACE_EVENT0("vk", "ShowKeyboardWindow");
28     window->Show();
29   }
30 }
31 
HideKeyboardWindow()32 void KeyboardUI::HideKeyboardWindow() {
33   DVLOG(1) << "HideKeyboardWindow";
34   aura::Window* window = GetKeyboardWindow();
35   if (window)
36     window->Hide();
37 }
38 
SetController(KeyboardUIController * controller)39 void KeyboardUI::SetController(KeyboardUIController* controller) {
40   keyboard_controller_ = controller;
41 }
42 
43 }  // namespace keyboard
44