• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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/views/corewm/input_method_event_filter.h"
11 
12 using namespace content;
13 
14 namespace ash {
15 
KeyboardControllerProxyStub()16 KeyboardControllerProxyStub::KeyboardControllerProxyStub() {
17 }
18 
~KeyboardControllerProxyStub()19 KeyboardControllerProxyStub::~KeyboardControllerProxyStub() {
20 }
21 
GetKeyboardWindow()22 aura::Window* KeyboardControllerProxyStub::GetKeyboardWindow() {
23   if (!keyboard_) {
24     keyboard_.reset(new aura::Window(&delegate_));
25     keyboard_->Init(ui::LAYER_NOT_DRAWN);
26   }
27   return keyboard_.get();
28 }
29 
GetBrowserContext()30 BrowserContext* KeyboardControllerProxyStub::GetBrowserContext() {
31   // TODO(oshima): investigate which profile to use.
32   return Shell::GetInstance()->delegate()->GetActiveBrowserContext();
33 }
34 
GetInputMethod()35 ui::InputMethod* KeyboardControllerProxyStub::GetInputMethod() {
36   return Shell::GetInstance()->input_method_filter()->input_method();
37 }
38 
RequestAudioInput(WebContents * web_contents,const MediaStreamRequest & request,const MediaResponseCallback & callback)39 void KeyboardControllerProxyStub::RequestAudioInput(
40     WebContents* web_contents,
41     const MediaStreamRequest& request,
42     const MediaResponseCallback& callback) {
43 }
44 
45 }  // namespace ash
46