Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(238)

Side by Side Diff: ash/shell/keyboard_controller_proxy_stub.cc

Issue 276483002: Fix calculation of usable area of screen when VK is shown. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix unittests Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/shell/keyboard_controller_proxy_stub.h" 5 #include "ash/shell/keyboard_controller_proxy_stub.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/shell_delegate.h" 8 #include "ash/shell_delegate.h"
9 #include "ui/aura/window.h" 9 #include "ui/aura/window.h"
10 #include "ui/wm/core/input_method_event_filter.h" 10 #include "ui/base/ime/mock_input_method.h"
11 11
12 using namespace content; 12 using namespace content;
13 13
14 namespace ash { 14 namespace ash {
15 15
16 KeyboardControllerProxyStub::KeyboardControllerProxyStub() { 16 KeyboardControllerProxyStub::KeyboardControllerProxyStub() {
17 } 17 }
18 18
19 KeyboardControllerProxyStub::~KeyboardControllerProxyStub() { 19 KeyboardControllerProxyStub::~KeyboardControllerProxyStub() {
20 } 20 }
21 21
22 bool KeyboardControllerProxyStub::HasKeyboardWindow() const { 22 bool KeyboardControllerProxyStub::HasKeyboardWindow() const {
23 return keyboard_; 23 return keyboard_;
24 } 24 }
25 25
26 aura::Window* KeyboardControllerProxyStub::GetKeyboardWindow() { 26 aura::Window* KeyboardControllerProxyStub::GetKeyboardWindow() {
27 if (!keyboard_) { 27 if (!keyboard_) {
28 keyboard_.reset(new aura::Window(&delegate_)); 28 keyboard_.reset(new aura::Window(&delegate_));
29 keyboard_->Init(aura::WINDOW_LAYER_NOT_DRAWN); 29 keyboard_->Init(aura::WINDOW_LAYER_NOT_DRAWN);
30 } 30 }
31 return keyboard_.get(); 31 return keyboard_.get();
32 } 32 }
33 33
34 BrowserContext* KeyboardControllerProxyStub::GetBrowserContext() { 34 BrowserContext* KeyboardControllerProxyStub::GetBrowserContext() {
35 // TODO(oshima): investigate which profile to use. 35 // TODO(oshima): investigate which profile to use.
36 return Shell::GetInstance()->delegate()->GetActiveBrowserContext(); 36 return Shell::GetInstance()->delegate()->GetActiveBrowserContext();
37 } 37 }
38 38
39 ui::InputMethod* KeyboardControllerProxyStub::GetInputMethod() { 39 ui::InputMethod* KeyboardControllerProxyStub::GetInputMethod() {
40 return Shell::GetInstance()->input_method_filter()->input_method(); 40 if (!input_method_)
41 input_method_.reset(new ui::MockInputMethod(NULL));
42 return input_method_.get();
41 } 43 }
42 44
43 void KeyboardControllerProxyStub::RequestAudioInput( 45 void KeyboardControllerProxyStub::RequestAudioInput(
44 WebContents* web_contents, 46 WebContents* web_contents,
45 const MediaStreamRequest& request, 47 const MediaStreamRequest& request,
46 const MediaResponseCallback& callback) { 48 const MediaResponseCallback& callback) {
47 } 49 }
48 50
49 void KeyboardControllerProxyStub::LoadSystemKeyboard() { 51 void KeyboardControllerProxyStub::LoadSystemKeyboard() {
50 } 52 }
51 53
52 void KeyboardControllerProxyStub::ReloadKeyboardIfNeeded() { 54 void KeyboardControllerProxyStub::ReloadKeyboardIfNeeded() {
53 } 55 }
54 56
55 } // namespace ash 57 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shell/keyboard_controller_proxy_stub.h ('k') | chrome/browser/ui/ash/ash_keyboard_controller_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698