Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(140)

Side by Side Diff: ui/keyboard/keyboard_controller_proxy.h

Issue 240443006: Remove native VK window height logic and wait for resizeTo to setup VK window height (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 DISALLOW_COPY_AND_ASSIGN(TestApi); 45 DISALLOW_COPY_AND_ASSIGN(TestApi);
46 }; 46 };
47 47
48 KeyboardControllerProxy(); 48 KeyboardControllerProxy();
49 virtual ~KeyboardControllerProxy(); 49 virtual ~KeyboardControllerProxy();
50 50
51 // Gets the virtual keyboard window. Ownership of the returned Window remains 51 // Gets the virtual keyboard window. Ownership of the returned Window remains
52 // with the proxy. 52 // with the proxy.
53 virtual aura::Window* GetKeyboardWindow(); 53 virtual aura::Window* GetKeyboardWindow();
54 54
55 // Whether the keyboard window is resizing from its web contents.
56 bool resizing_from_contents() const { return resizing_from_contents_; }
57
58 // Whether the keyboard window is created. The keyboard window is tied to a 55 // Whether the keyboard window is created. The keyboard window is tied to a
59 // WebContent so we can just check if the WebContent is created or not. 56 // WebContent so we can just check if the WebContent is created or not.
60 virtual bool HasKeyboardWindow() const; 57 virtual bool HasKeyboardWindow() const;
61 58
62 // Sets the flag of whether the keyboard window is resizing from
63 // its web contents.
64 void set_resizing_from_contents(bool resizing) {
65 resizing_from_contents_ = resizing;
66 }
67
68 // Gets the InputMethod that will provide notifications about changes in the 59 // Gets the InputMethod that will provide notifications about changes in the
69 // text input context. 60 // text input context.
70 virtual ui::InputMethod* GetInputMethod() = 0; 61 virtual ui::InputMethod* GetInputMethod() = 0;
71 62
72 // Requests the audio input from microphone for speech input. 63 // Requests the audio input from microphone for speech input.
73 virtual void RequestAudioInput(content::WebContents* web_contents, 64 virtual void RequestAudioInput(content::WebContents* web_contents,
74 const content::MediaStreamRequest& request, 65 const content::MediaStreamRequest& request,
75 const content::MediaResponseCallback& callback) = 0; 66 const content::MediaResponseCallback& callback) = 0;
76 67
77 // Shows the container window of the keyboard. The default implementation 68 // Shows the container window of the keyboard. The default implementation
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 // Loads the web contents for the given |url|. 114 // Loads the web contents for the given |url|.
124 void LoadContents(const GURL& url); 115 void LoadContents(const GURL& url);
125 116
126 // Gets the virtual keyboard URL (either the default URL or IME override URL). 117 // Gets the virtual keyboard URL (either the default URL or IME override URL).
127 const GURL& GetVirtualKeyboardUrl(); 118 const GURL& GetVirtualKeyboardUrl();
128 119
129 const GURL default_url_; 120 const GURL default_url_;
130 121
131 scoped_ptr<content::WebContents> keyboard_contents_; 122 scoped_ptr<content::WebContents> keyboard_contents_;
132 123
133 // Whether the current keyboard window is resizing from its web content.
134 bool resizing_from_contents_;
135
136 DISALLOW_COPY_AND_ASSIGN(KeyboardControllerProxy); 124 DISALLOW_COPY_AND_ASSIGN(KeyboardControllerProxy);
137 }; 125 };
138 126
139 } // namespace keyboard 127 } // namespace keyboard
140 128
141 #endif // UI_KEYBOARD_KEYBOARD_CONTROLLER_PROXY_H_ 129 #endif // UI_KEYBOARD_KEYBOARD_CONTROLLER_PROXY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698