OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #ifndef CHROME_BROWSER_UI_ASH_ASH_KEYBOARD_CONTROLLER_PROXY_H_ | 5 #ifndef CHROME_BROWSER_UI_ASH_ASH_KEYBOARD_CONTROLLER_PROXY_H_ |
6 #define CHROME_BROWSER_UI_ASH_ASH_KEYBOARD_CONTROLLER_PROXY_H_ | 6 #define CHROME_BROWSER_UI_ASH_ASH_KEYBOARD_CONTROLLER_PROXY_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "content/public/browser/web_contents_observer.h" | 10 #include "content/public/browser/web_contents_observer.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 } | 26 } |
27 | 27 |
28 // Subclass of KeyboardControllerProxy. It is used by KeyboardController to get | 28 // Subclass of KeyboardControllerProxy. It is used by KeyboardController to get |
29 // access to the virtual keyboard window and setup Chrome extension functions. | 29 // access to the virtual keyboard window and setup Chrome extension functions. |
30 class AshKeyboardControllerProxy | 30 class AshKeyboardControllerProxy |
31 : public keyboard::KeyboardControllerProxy, | 31 : public keyboard::KeyboardControllerProxy, |
32 public content::WebContentsObserver, | 32 public content::WebContentsObserver, |
33 public extensions::ExtensionFunctionDispatcher::Delegate { | 33 public extensions::ExtensionFunctionDispatcher::Delegate { |
34 public: | 34 public: |
35 AshKeyboardControllerProxy(); | 35 AshKeyboardControllerProxy(); |
36 virtual ~AshKeyboardControllerProxy(); | 36 ~AshKeyboardControllerProxy() override; |
37 | 37 |
38 private: | 38 private: |
39 void OnRequest(const ExtensionHostMsg_Request_Params& params); | 39 void OnRequest(const ExtensionHostMsg_Request_Params& params); |
40 | 40 |
41 // keyboard::KeyboardControllerProxy overrides | 41 // keyboard::KeyboardControllerProxy overrides |
42 virtual content::BrowserContext* GetBrowserContext() override; | 42 content::BrowserContext* GetBrowserContext() override; |
43 virtual ui::InputMethod* GetInputMethod() override; | 43 ui::InputMethod* GetInputMethod() override; |
44 virtual void RequestAudioInput(content::WebContents* web_contents, | 44 void RequestAudioInput( |
| 45 content::WebContents* web_contents, |
45 const content::MediaStreamRequest& request, | 46 const content::MediaStreamRequest& request, |
46 const content::MediaResponseCallback& callback) override; | 47 const content::MediaResponseCallback& callback) override; |
47 virtual void SetupWebContents(content::WebContents* contents) override; | 48 void SetupWebContents(content::WebContents* contents) override; |
48 virtual void ShowKeyboardContainer(aura::Window* container) override; | 49 void ShowKeyboardContainer(aura::Window* container) override; |
49 | 50 |
50 // The overridden implementation dispatches | 51 // The overridden implementation dispatches |
51 // chrome.virtualKeyboardPrivate.onTextInputBoxFocused event to extension to | 52 // chrome.virtualKeyboardPrivate.onTextInputBoxFocused event to extension to |
52 // provide the input type information. Naturally, when the virtual keyboard | 53 // provide the input type information. Naturally, when the virtual keyboard |
53 // extension is used as an IME then chrome.input.ime.onFocus provides the | 54 // extension is used as an IME then chrome.input.ime.onFocus provides the |
54 // information, but not when the virtual keyboard is used in conjunction with | 55 // information, but not when the virtual keyboard is used in conjunction with |
55 // another IME. virtualKeyboardPrivate.onTextInputBoxFocused is the remedy in | 56 // another IME. virtualKeyboardPrivate.onTextInputBoxFocused is the remedy in |
56 // that case. | 57 // that case. |
57 virtual void SetUpdateInputType(ui::TextInputType type) override; | 58 void SetUpdateInputType(ui::TextInputType type) override; |
58 | 59 |
59 // extensions::ExtensionFunctionDispatcher::Delegate overrides | 60 // extensions::ExtensionFunctionDispatcher::Delegate overrides |
60 virtual extensions::WindowController* GetExtensionWindowController() const | 61 extensions::WindowController* GetExtensionWindowController() const override; |
61 override; | 62 content::WebContents* GetAssociatedWebContents() const override; |
62 virtual content::WebContents* GetAssociatedWebContents() const override; | |
63 | 63 |
64 // content::WebContentsObserver overrides | 64 // content::WebContentsObserver overrides |
65 virtual bool OnMessageReceived(const IPC::Message& message) override; | 65 bool OnMessageReceived(const IPC::Message& message) override; |
66 | 66 |
67 scoped_ptr<extensions::ExtensionFunctionDispatcher> | 67 scoped_ptr<extensions::ExtensionFunctionDispatcher> |
68 extension_function_dispatcher_; | 68 extension_function_dispatcher_; |
69 | 69 |
70 DISALLOW_COPY_AND_ASSIGN(AshKeyboardControllerProxy); | 70 DISALLOW_COPY_AND_ASSIGN(AshKeyboardControllerProxy); |
71 }; | 71 }; |
72 | 72 |
73 #endif // CHROME_BROWSER_UI_ASH_ASH_KEYBOARD_CONTROLLER_PROXY_H_ | 73 #endif // CHROME_BROWSER_UI_ASH_ASH_KEYBOARD_CONTROLLER_PROXY_H_ |
OLD | NEW |