| 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 20 matching lines...) Expand all Loading... |
| 31 | 31 |
| 32 // Subclass of KeyboardControllerProxy. It is used by KeyboardController to get | 32 // Subclass of KeyboardControllerProxy. It is used by KeyboardController to get |
| 33 // access to the virtual keyboard window and setup Chrome extension functions. | 33 // access to the virtual keyboard window and setup Chrome extension functions. |
| 34 class AshKeyboardControllerProxy | 34 class AshKeyboardControllerProxy |
| 35 : public keyboard::KeyboardControllerProxy, | 35 : public keyboard::KeyboardControllerProxy, |
| 36 public content::WebContentsObserver { | 36 public content::WebContentsObserver { |
| 37 public: | 37 public: |
| 38 explicit AshKeyboardControllerProxy(content::BrowserContext* context); | 38 explicit AshKeyboardControllerProxy(content::BrowserContext* context); |
| 39 ~AshKeyboardControllerProxy() override; | 39 ~AshKeyboardControllerProxy() override; |
| 40 | 40 |
| 41 // keyboard::KeyboardControllerProxy overrides |
| 42 bool ShouldWindowOverscroll(aura::Window* window) const override; |
| 43 |
| 41 private: | 44 private: |
| 42 // keyboard::KeyboardControllerProxy overrides | 45 // keyboard::KeyboardControllerProxy overrides |
| 43 ui::InputMethod* GetInputMethod() override; | 46 ui::InputMethod* GetInputMethod() override; |
| 44 void RequestAudioInput( | 47 void RequestAudioInput( |
| 45 content::WebContents* web_contents, | 48 content::WebContents* web_contents, |
| 46 const content::MediaStreamRequest& request, | 49 const content::MediaStreamRequest& request, |
| 47 const content::MediaResponseCallback& callback) override; | 50 const content::MediaResponseCallback& callback) override; |
| 48 void SetupWebContents(content::WebContents* contents) override; | 51 void SetupWebContents(content::WebContents* contents) override; |
| 49 void SetController(keyboard::KeyboardController* controller) override; | 52 void SetController(keyboard::KeyboardController* controller) override; |
| 50 void ShowKeyboardContainer(aura::Window* container) override; | 53 void ShowKeyboardContainer(aura::Window* container) override; |
| 51 | 54 |
| 52 // The overridden implementation dispatches | 55 // The overridden implementation dispatches |
| 53 // chrome.virtualKeyboardPrivate.onTextInputBoxFocused event to extension to | 56 // chrome.virtualKeyboardPrivate.onTextInputBoxFocused event to extension to |
| 54 // provide the input type information. Naturally, when the virtual keyboard | 57 // provide the input type information. Naturally, when the virtual keyboard |
| 55 // extension is used as an IME then chrome.input.ime.onFocus provides the | 58 // extension is used as an IME then chrome.input.ime.onFocus provides the |
| 56 // information, but not when the virtual keyboard is used in conjunction with | 59 // information, but not when the virtual keyboard is used in conjunction with |
| 57 // another IME. virtualKeyboardPrivate.onTextInputBoxFocused is the remedy in | 60 // another IME. virtualKeyboardPrivate.onTextInputBoxFocused is the remedy in |
| 58 // that case. | 61 // that case. |
| 59 void SetUpdateInputType(ui::TextInputType type) override; | 62 void SetUpdateInputType(ui::TextInputType type) override; |
| 60 | 63 |
| 61 // content::WebContentsObserver overrides | 64 // content::WebContentsObserver overrides |
| 62 void RenderViewCreated(content::RenderViewHost* render_view_host) override; | 65 void RenderViewCreated(content::RenderViewHost* render_view_host) override; |
| 63 | 66 |
| 64 scoped_ptr<keyboard::KeyboardControllerObserver> observer_; | 67 scoped_ptr<keyboard::KeyboardControllerObserver> observer_; |
| 65 | 68 |
| 66 DISALLOW_COPY_AND_ASSIGN(AshKeyboardControllerProxy); | 69 DISALLOW_COPY_AND_ASSIGN(AshKeyboardControllerProxy); |
| 67 }; | 70 }; |
| 68 | 71 |
| 69 #endif // CHROME_BROWSER_UI_ASH_ASH_KEYBOARD_CONTROLLER_PROXY_H_ | 72 #endif // CHROME_BROWSER_UI_ASH_ASH_KEYBOARD_CONTROLLER_PROXY_H_ |
| OLD | NEW |