Don't preload rarely seen large images
[chromium-blink-merge.git] / ash / shell / keyboard_controller_proxy_stub.cc
blobf1e9fed397ad24e873d4c7a84a701dfa6e6e6966
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"
7 #include "ash/shell.h"
8 #include "ash/shell_delegate.h"
9 #include "ash/wm/window_util.h"
10 #include "ui/aura/window.h"
11 #include "ui/aura/window_tree_host.h"
12 #include "ui/base/ime/mock_input_method.h"
14 using namespace content;
16 namespace ash {
18 KeyboardControllerProxyStub::KeyboardControllerProxyStub()
19 : keyboard::KeyboardControllerProxy(Shell::GetInstance()
20 ->delegate()
21 ->GetActiveBrowserContext()) {
24 KeyboardControllerProxyStub::~KeyboardControllerProxyStub() {
27 bool KeyboardControllerProxyStub::HasKeyboardWindow() const {
28 return keyboard_;
31 aura::Window* KeyboardControllerProxyStub::GetKeyboardWindow() {
32 if (!keyboard_) {
33 keyboard_.reset(new aura::Window(&delegate_));
34 keyboard_->Init(ui::LAYER_NOT_DRAWN);
36 return keyboard_.get();
39 ui::InputMethod* KeyboardControllerProxyStub::GetInputMethod() {
40 aura::Window* active_window = wm::GetActiveWindow();
41 aura::Window* root_window = active_window ? active_window->GetRootWindow()
42 : Shell::GetPrimaryRootWindow();
43 return root_window->GetHost()->GetInputMethod();
46 void KeyboardControllerProxyStub::RequestAudioInput(
47 WebContents* web_contents,
48 const MediaStreamRequest& request,
49 const MediaResponseCallback& callback) {
52 void KeyboardControllerProxyStub::LoadSystemKeyboard() {
55 void KeyboardControllerProxyStub::ReloadKeyboardIfNeeded() {
58 } // namespace ash