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/macros.h" | 8 #include "base/macros.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 23 matching lines...) Expand all Loading... |
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 | 40 // keyboard::KeyboardUIContent overrides |
41 bool ShouldWindowOverscroll(aura::Window* window) const override; | 41 bool ShouldWindowOverscroll(aura::Window* window) const override; |
42 | 42 |
43 private: | 43 private: |
44 // keyboard::KeyboardControllerProxy overrides | 44 // keyboard::KeyboardUIContent overrides |
45 ui::InputMethod* GetInputMethod() override; | 45 ui::InputMethod* GetInputMethod() override; |
46 void RequestAudioInput( | 46 void RequestAudioInput( |
47 content::WebContents* web_contents, | 47 content::WebContents* web_contents, |
48 const content::MediaStreamRequest& request, | 48 const content::MediaStreamRequest& request, |
49 const content::MediaResponseCallback& callback) override; | 49 const content::MediaResponseCallback& callback) override; |
50 void SetupWebContents(content::WebContents* contents) override; | 50 void SetupWebContents(content::WebContents* contents) override; |
51 void SetController(keyboard::KeyboardController* controller) override; | 51 void SetController(keyboard::KeyboardController* controller) override; |
52 void ShowKeyboardContainer(aura::Window* container) override; | 52 void ShowKeyboardContainer(aura::Window* container) override; |
53 | 53 |
54 // The overridden implementation dispatches | 54 // The overridden implementation dispatches |
55 // chrome.virtualKeyboardPrivate.onTextInputBoxFocused event to extension to | 55 // chrome.virtualKeyboardPrivate.onTextInputBoxFocused event to extension to |
56 // provide the input type information. Naturally, when the virtual keyboard | 56 // provide the input type information. Naturally, when the virtual keyboard |
57 // 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 |
58 // 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 |
59 // another IME. virtualKeyboardPrivate.onTextInputBoxFocused is the remedy in | 59 // another IME. virtualKeyboardPrivate.onTextInputBoxFocused is the remedy in |
60 // that case. | 60 // that case. |
61 void SetUpdateInputType(ui::TextInputType type) override; | 61 void SetUpdateInputType(ui::TextInputType type) override; |
62 | 62 |
63 // content::WebContentsObserver overrides | 63 // content::WebContentsObserver overrides |
64 void RenderViewCreated(content::RenderViewHost* render_view_host) override; | 64 void RenderViewCreated(content::RenderViewHost* render_view_host) override; |
65 | 65 |
66 scoped_ptr<keyboard::KeyboardControllerObserver> observer_; | 66 scoped_ptr<keyboard::KeyboardControllerObserver> observer_; |
67 | 67 |
68 DISALLOW_COPY_AND_ASSIGN(ChromeKeyboardUI); | 68 DISALLOW_COPY_AND_ASSIGN(ChromeKeyboardUI); |
69 }; | 69 }; |
70 | 70 |
71 #endif // CHROME_BROWSER_UI_ASH_CHROME_KEYBOARD_UI_H_ | 71 #endif // CHROME_BROWSER_UI_ASH_CHROME_KEYBOARD_UI_H_ |
OLD | NEW |