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.
5 #include "ash/shell/keyboard_controller_proxy_stub.h"
8 #include "ash/shell_delegate.h"
9 #include "ui/aura/window.h"
10 #include "ui/base/ime/mock_input_method.h"
12 using namespace content;
16 KeyboardControllerProxyStub::KeyboardControllerProxyStub() {
19 KeyboardControllerProxyStub::~KeyboardControllerProxyStub() {
22 bool KeyboardControllerProxyStub::HasKeyboardWindow() const {
26 aura::Window* KeyboardControllerProxyStub::GetKeyboardWindow() {
28 keyboard_.reset(new aura::Window(&delegate_));
29 keyboard_->Init(aura::WINDOW_LAYER_NOT_DRAWN);
31 return keyboard_.get();
34 BrowserContext* KeyboardControllerProxyStub::GetBrowserContext() {
35 // TODO(oshima): investigate which profile to use.
36 return Shell::GetInstance()->delegate()->GetActiveBrowserContext();
39 ui::InputMethod* KeyboardControllerProxyStub::GetInputMethod() {
41 input_method_.reset(new ui::MockInputMethod(NULL));
42 return input_method_.get();
45 void KeyboardControllerProxyStub::RequestAudioInput(
46 WebContents* web_contents,
47 const MediaStreamRequest& request,
48 const MediaResponseCallback& callback) {
51 void KeyboardControllerProxyStub::LoadSystemKeyboard() {
54 void KeyboardControllerProxyStub::ReloadKeyboardIfNeeded() {