diff options
author | bshe@chromium.org <bshe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-16 02:56:10 +0000 |
---|---|---|
committer | bshe@chromium.org <bshe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-16 02:56:10 +0000 |
commit | a53dcc96cc25a896b06f535d419c02135b973adb (patch) | |
tree | 81d88f37ee71080cd57c125577531489f33018ca /ash/shell | |
parent | 5e01b54602839ba80390ca54f6b037018af33509 (diff) | |
download | chromium_src-a53dcc96cc25a896b06f535d419c02135b973adb.zip chromium_src-a53dcc96cc25a896b06f535d419c02135b973adb.tar.gz chromium_src-a53dcc96cc25a896b06f535d419c02135b973adb.tar.bz2 |
Add a full screen virtual keyboard to virtual keyboard root window
BUG=310331
TEST=
1. add keyboard-usability-experiment flag
2. hook up an external screen
3. boot device
expected: a full screen keyboard on one of the screen
Review URL: https://codereview.chromium.org/47873003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@235502 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/shell')
-rw-r--r-- | ash/shell/keyboard_controller_proxy_stub.cc | 42 | ||||
-rw-r--r-- | ash/shell/keyboard_controller_proxy_stub.h | 39 | ||||
-rw-r--r-- | ash/shell/shell_delegate_impl.cc | 2 |
3 files changed, 82 insertions, 1 deletions
diff --git a/ash/shell/keyboard_controller_proxy_stub.cc b/ash/shell/keyboard_controller_proxy_stub.cc new file mode 100644 index 0000000..700c834 --- /dev/null +++ b/ash/shell/keyboard_controller_proxy_stub.cc @@ -0,0 +1,42 @@ +// Copyright 2013 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "ash/shell/keyboard_controller_proxy_stub.h" + +#include "ash/shell.h" +#include "ash/shell_delegate.h" +#include "ui/aura/window.h" +#include "ui/views/corewm/input_method_event_filter.h" + +using namespace content; + +namespace ash { + +KeyboardControllerProxyStub::KeyboardControllerProxyStub() { +} + +KeyboardControllerProxyStub::~KeyboardControllerProxyStub() { +} + +aura::Window* KeyboardControllerProxyStub::GetKeyboardWindow() { + aura::Window* window = new aura::Window(&delegate_); + window->Init(ui::LAYER_NOT_DRAWN); + return window; +} + +BrowserContext* KeyboardControllerProxyStub::GetBrowserContext() { + return Shell::GetInstance()->delegate()->GetCurrentBrowserContext(); +} + +ui::InputMethod* KeyboardControllerProxyStub::GetInputMethod() { + return Shell::GetInstance()->input_method_filter()->input_method(); +} + +void KeyboardControllerProxyStub::RequestAudioInput( + WebContents* web_contents, + const MediaStreamRequest& request, + const MediaResponseCallback& callback) { +} + +} // namespace ash diff --git a/ash/shell/keyboard_controller_proxy_stub.h b/ash/shell/keyboard_controller_proxy_stub.h new file mode 100644 index 0000000..639e5d2 --- /dev/null +++ b/ash/shell/keyboard_controller_proxy_stub.h @@ -0,0 +1,39 @@ +// Copyright 2013 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef ASH_SHELL_KEYBOARD_CONTROLLER_PROXY_STUB_H_ +#define ASH_SHELL_KEYBOARD_CONTROLLER_PROXY_STUB_H_ + +#include "ui/aura/test/test_window_delegate.h" +#include "ui/keyboard/keyboard_controller_proxy.h" + +namespace aura { +class Window; +} // namespace aura + +namespace ash { + +// Stub implementation of KeyboardControllerProxy +class KeyboardControllerProxyStub : public keyboard::KeyboardControllerProxy { + public: + KeyboardControllerProxyStub(); + virtual ~KeyboardControllerProxyStub(); + + virtual aura::Window* GetKeyboardWindow() OVERRIDE; + + private: + // Overridden from keyboard::KeyboardControllerProxy: + virtual content::BrowserContext* GetBrowserContext() OVERRIDE; + virtual ui::InputMethod* GetInputMethod() OVERRIDE; + virtual void RequestAudioInput(content::WebContents* web_contents, + const content::MediaStreamRequest& request, + const content::MediaResponseCallback& callback) OVERRIDE; + + aura::test::TestWindowDelegate delegate_; + DISALLOW_COPY_AND_ASSIGN(KeyboardControllerProxyStub); +}; + +} // namespace ash + +#endif // ASH_SHELL_KEYBOARD_CONTROLLER_PROXY_STUB_H_ diff --git a/ash/shell/shell_delegate_impl.cc b/ash/shell/shell_delegate_impl.cc index 44d955f..acc8e3d 100644 --- a/ash/shell/shell_delegate_impl.cc +++ b/ash/shell/shell_delegate_impl.cc @@ -9,13 +9,13 @@ #include "ash/default_accessibility_delegate.h" #include "ash/default_user_wallpaper_delegate.h" #include "ash/host/root_window_host_factory.h" -#include "ash/keyboard_controller_proxy_stub.h" #include "ash/media_delegate.h" #include "ash/new_window_delegate.h" #include "ash/session_state_delegate.h" #include "ash/session_state_delegate_stub.h" #include "ash/shell/context_menu.h" #include "ash/shell/example_factory.h" +#include "ash/shell/keyboard_controller_proxy_stub.h" #include "ash/shell/launcher_delegate_impl.h" #include "ash/shell/toplevel_window.h" #include "ash/shell_window_ids.h" |