| 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 UI_KEYBOARD_KEYBOARD_CONTROLLER_PROXY_H_ | 5 #ifndef UI_KEYBOARD_KEYBOARD_CONTROLLER_PROXY_H_ |
| 6 #define UI_KEYBOARD_KEYBOARD_CONTROLLER_PROXY_H_ | 6 #define UI_KEYBOARD_KEYBOARD_CONTROLLER_PROXY_H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "content/public/common/media_stream_request.h" | 9 #include "content/public/common/media_stream_request.h" |
| 10 #include "ui/base/ime/text_input_type.h" | 10 #include "ui/base/ime/text_input_type.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 KeyboardControllerProxy(); | 34 KeyboardControllerProxy(); |
| 35 virtual ~KeyboardControllerProxy(); | 35 virtual ~KeyboardControllerProxy(); |
| 36 | 36 |
| 37 // Gets the virtual keyboard window. Ownership of the returned Window remains | 37 // Gets the virtual keyboard window. Ownership of the returned Window remains |
| 38 // with the proxy. | 38 // with the proxy. |
| 39 virtual aura::Window* GetKeyboardWindow(); | 39 virtual aura::Window* GetKeyboardWindow(); |
| 40 | 40 |
| 41 // Sets the override content url. | 41 // Sets the override content url. |
| 42 void SetOverrideContentUrl(const GURL& url); | 42 void SetOverrideContentUrl(const GURL& url); |
| 43 | 43 |
| 44 // Whether the keyboard window is resizing from its web contents. |
| 45 bool resizing_from_contents() const { return resizing_from_contents_; } |
| 46 |
| 47 // Sets the flag of whether the keyboard window is resizing from |
| 48 // its web contents. |
| 49 void set_resizing_from_contents(bool resizing) { |
| 50 resizing_from_contents_ = resizing; |
| 51 } |
| 52 |
| 44 // Gets the InputMethod that will provide notifications about changes in the | 53 // Gets the InputMethod that will provide notifications about changes in the |
| 45 // text input context. | 54 // text input context. |
| 46 virtual ui::InputMethod* GetInputMethod() = 0; | 55 virtual ui::InputMethod* GetInputMethod() = 0; |
| 47 | 56 |
| 48 // Requests the audio input from microphone for speech input. | 57 // Requests the audio input from microphone for speech input. |
| 49 virtual void RequestAudioInput(content::WebContents* web_contents, | 58 virtual void RequestAudioInput(content::WebContents* web_contents, |
| 50 const content::MediaStreamRequest& request, | 59 const content::MediaStreamRequest& request, |
| 51 const content::MediaResponseCallback& callback) = 0; | 60 const content::MediaResponseCallback& callback) = 0; |
| 52 | 61 |
| 53 // Shows the container window of the keyboard. The default implementation | 62 // Shows the container window of the keyboard. The default implementation |
| (...skipping 27 matching lines...) Expand all Loading... |
| 81 void ReloadContents(); | 90 void ReloadContents(); |
| 82 | 91 |
| 83 // Gets the valid url from default url or override url. | 92 // Gets the valid url from default url or override url. |
| 84 const GURL& GetValidUrl(); | 93 const GURL& GetValidUrl(); |
| 85 | 94 |
| 86 const GURL default_url_; | 95 const GURL default_url_; |
| 87 GURL override_url_; | 96 GURL override_url_; |
| 88 | 97 |
| 89 scoped_ptr<content::WebContents> keyboard_contents_; | 98 scoped_ptr<content::WebContents> keyboard_contents_; |
| 90 | 99 |
| 100 // Whether the current keyboard window is resizing from its web content. |
| 101 bool resizing_from_contents_; |
| 102 |
| 91 DISALLOW_COPY_AND_ASSIGN(KeyboardControllerProxy); | 103 DISALLOW_COPY_AND_ASSIGN(KeyboardControllerProxy); |
| 92 }; | 104 }; |
| 93 | 105 |
| 94 } // namespace keyboard | 106 } // namespace keyboard |
| 95 | 107 |
| 96 #endif // UI_KEYBOARD_KEYBOARD_CONTROLLER_PROXY_H_ | 108 #endif // UI_KEYBOARD_KEYBOARD_CONTROLLER_PROXY_H_ |
| OLD | NEW |