diff options
author | pkotwicz <pkotwicz@chromium.org> | 2014-11-18 16:07:36 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-11-19 00:07:53 +0000 |
commit | 8f7ebffc05e39acd69a92b33adacd289c895e269 (patch) | |
tree | 0a542fda4a3b9828c2b38c9d28f3ac81ecf08f90 /ash/shell | |
parent | 9bbc20b286a526d650a291419a8bc0c73b45dffe (diff) | |
download | chromium_src-8f7ebffc05e39acd69a92b33adacd289c895e269.zip chromium_src-8f7ebffc05e39acd69a92b33adacd289c895e269.tar.gz chromium_src-8f7ebffc05e39acd69a92b33adacd289c895e269.tar.bz2 |
Componentize AshKeyboardControllerProxy part1
This CL makes KeyboardControllerProxy take in a BrowserContext in the
constructor. A new KeyboardControllerProxy is created via
ash::Shell::CreateKeyboard() when the BrowserContext changes
BUG=431448
TEST=None
Review URL: https://codereview.chromium.org/711843002
Cr-Commit-Position: refs/heads/master@{#304707}
Diffstat (limited to 'ash/shell')
-rw-r--r-- | ash/shell/keyboard_controller_proxy_stub.cc | 10 | ||||
-rw-r--r-- | ash/shell/keyboard_controller_proxy_stub.h | 1 |
2 files changed, 4 insertions, 7 deletions
diff --git a/ash/shell/keyboard_controller_proxy_stub.cc b/ash/shell/keyboard_controller_proxy_stub.cc index 7127975..c4c8149 100644 --- a/ash/shell/keyboard_controller_proxy_stub.cc +++ b/ash/shell/keyboard_controller_proxy_stub.cc @@ -14,7 +14,10 @@ using namespace content; namespace ash { -KeyboardControllerProxyStub::KeyboardControllerProxyStub() { +KeyboardControllerProxyStub::KeyboardControllerProxyStub() + : keyboard::KeyboardControllerProxy(Shell::GetInstance() + ->delegate() + ->GetActiveBrowserContext()) { } KeyboardControllerProxyStub::~KeyboardControllerProxyStub() { @@ -32,11 +35,6 @@ aura::Window* KeyboardControllerProxyStub::GetKeyboardWindow() { return keyboard_.get(); } -BrowserContext* KeyboardControllerProxyStub::GetBrowserContext() { - // TODO(oshima): investigate which profile to use. - return Shell::GetInstance()->delegate()->GetActiveBrowserContext(); -} - ui::InputMethod* KeyboardControllerProxyStub::GetInputMethod() { return Shell::GetInstance()->input_method_filter()->input_method(); } diff --git a/ash/shell/keyboard_controller_proxy_stub.h b/ash/shell/keyboard_controller_proxy_stub.h index 2444b27..a563a57 100644 --- a/ash/shell/keyboard_controller_proxy_stub.h +++ b/ash/shell/keyboard_controller_proxy_stub.h @@ -25,7 +25,6 @@ class KeyboardControllerProxyStub : public keyboard::KeyboardControllerProxy { private: // Overridden from keyboard::KeyboardControllerProxy: - content::BrowserContext* GetBrowserContext() override; ui::InputMethod* GetInputMethod() override; void RequestAudioInput( content::WebContents* web_contents, |