keyboard_controller_proxy_stub.cc revision cedac228d2dd51db4b79ea1e72c7f249408ee061
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 12using namespace content; 13 14namespace ash { 15 16KeyboardControllerProxyStub::KeyboardControllerProxyStub() { 17} 18 19KeyboardControllerProxyStub::~KeyboardControllerProxyStub() { 20} 21 22bool KeyboardControllerProxyStub::HasKeyboardWindow() const { 23 return keyboard_; 24} 25 26aura::Window* KeyboardControllerProxyStub::GetKeyboardWindow() { 27 if (!keyboard_) { 28 keyboard_.reset(new aura::Window(&delegate_)); 29 keyboard_->Init(aura::WINDOW_LAYER_NOT_DRAWN); 30 } 31 return keyboard_.get(); 32} 33 34BrowserContext* KeyboardControllerProxyStub::GetBrowserContext() { 35 // TODO(oshima): investigate which profile to use. 36 return Shell::GetInstance()->delegate()->GetActiveBrowserContext(); 37} 38 39ui::InputMethod* KeyboardControllerProxyStub::GetInputMethod() { 40 if (!input_method_) 41 input_method_.reset(new ui::MockInputMethod(NULL)); 42 return input_method_.get(); 43} 44 45void KeyboardControllerProxyStub::RequestAudioInput( 46 WebContents* web_contents, 47 const MediaStreamRequest& request, 48 const MediaResponseCallback& callback) { 49} 50 51void KeyboardControllerProxyStub::LoadSystemKeyboard() { 52} 53 54void KeyboardControllerProxyStub::ReloadKeyboardIfNeeded() { 55} 56 57} // namespace ash 58