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