keyboard_controller_proxy_stub.cc revision 116680a4aac90f2aa7413d9095a592090648e557
1// Copyright 2013 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/shell/keyboard_controller_proxy_stub.h"
6
7#include "ash/shell.h"
8#include "ash/shell_delegate.h"
9#include "ui/aura/window.h"
10#include "ui/base/ime/mock_input_method.h"
11#include "ui/wm/core/input_method_event_filter.h"
12
13using namespace content;
14
15namespace ash {
16
17KeyboardControllerProxyStub::KeyboardControllerProxyStub() {
18}
19
20KeyboardControllerProxyStub::~KeyboardControllerProxyStub() {
21}
22
23bool KeyboardControllerProxyStub::HasKeyboardWindow() const {
24  return keyboard_;
25}
26
27aura::Window* KeyboardControllerProxyStub::GetKeyboardWindow() {
28  if (!keyboard_) {
29    keyboard_.reset(new aura::Window(&delegate_));
30    keyboard_->Init(aura::WINDOW_LAYER_NOT_DRAWN);
31  }
32  return keyboard_.get();
33}
34
35BrowserContext* KeyboardControllerProxyStub::GetBrowserContext() {
36  // TODO(oshima): investigate which profile to use.
37  return Shell::GetInstance()->delegate()->GetActiveBrowserContext();
38}
39
40ui::InputMethod* KeyboardControllerProxyStub::GetInputMethod() {
41  return Shell::GetInstance()->input_method_filter()->input_method();
42}
43
44void KeyboardControllerProxyStub::RequestAudioInput(
45    WebContents* web_contents,
46    const MediaStreamRequest& request,
47    const MediaResponseCallback& callback) {
48}
49
50void KeyboardControllerProxyStub::LoadSystemKeyboard() {
51}
52
53void KeyboardControllerProxyStub::ReloadKeyboardIfNeeded() {
54}
55
56}  // namespace ash
57