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

Side by Side Diff: content/renderer/render_widget.h

Issue 1249013005: Merge ViewHostMsg_TextInputTypeChanged and ViewHostMsg_TextInputStateChanged into one. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits. Created 5 years, 4 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CONTENT_RENDERER_RENDER_WIDGET_H_ 5 #ifndef CONTENT_RENDERER_RENDER_WIDGET_H_
6 #define CONTENT_RENDERER_RENDER_WIDGET_H_ 6 #define CONTENT_RENDERER_RENDER_WIDGET_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <map> 9 #include <map>
10 10
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 289
290 void ScheduleComposite(); 290 void ScheduleComposite();
291 void ScheduleCompositeWithForcedRedraw(); 291 void ScheduleCompositeWithForcedRedraw();
292 292
293 // Called by the compositor in single-threaded mode when a swap is posted, 293 // Called by the compositor in single-threaded mode when a swap is posted,
294 // completes or is aborted. 294 // completes or is aborted.
295 void OnSwapBuffersPosted(); 295 void OnSwapBuffersPosted();
296 void OnSwapBuffersComplete(); 296 void OnSwapBuffersComplete();
297 void OnSwapBuffersAborted(); 297 void OnSwapBuffersAborted();
298 298
299 // Checks if the text input state and compose inline mode have been changed.
300 // If they are changed, the new value will be sent to the browser process.
301 void UpdateTextInputType();
302
303 // Checks if the selection bounds have been changed. If they are changed, 299 // Checks if the selection bounds have been changed. If they are changed,
304 // the new value will be sent to the browser process. 300 // the new value will be sent to the browser process.
305 void UpdateSelectionBounds(); 301 void UpdateSelectionBounds();
306 302
307 virtual void GetSelectionBounds(gfx::Rect* start, gfx::Rect* end); 303 virtual void GetSelectionBounds(gfx::Rect* start, gfx::Rect* end);
308 304
309 void OnShowHostContextMenu(ContextMenuParams* params); 305 void OnShowHostContextMenu(ContextMenuParams* params);
310 306
311 #if defined(OS_ANDROID) || defined(USE_AURA)
312 enum ShowIme { 307 enum ShowIme {
313 SHOW_IME_IF_NEEDED, 308 SHOW_IME_IF_NEEDED,
314 NO_SHOW_IME, 309 NO_SHOW_IME,
315 }; 310 };
316 311
317 enum ChangeSource { 312 enum ChangeSource {
318 FROM_NON_IME, 313 FROM_NON_IME,
319 FROM_IME, 314 FROM_IME,
320 }; 315 };
321 316
322 // |show_ime| should be SHOW_IME_IF_NEEDED iff the update may cause the ime to 317 // |show_ime| should be SHOW_IME_IF_NEEDED iff the update may cause the ime to
323 // be displayed, e.g. after a tap on an input field on mobile. 318 // be displayed, e.g. after a tap on an input field on mobile.
324 // |change_source| should be FROM_NON_IME when the renderer has to wait for 319 // |change_source| should be FROM_NON_IME when the renderer has to wait for
325 // the browser to acknowledge the change before the renderer handles any more 320 // the browser to acknowledge the change before the renderer handles any more
326 // IME events. This is when the text change did not originate from the IME in 321 // IME events. This is when the text change did not originate from the IME in
327 // the browser side, such as changes by JavaScript or autofill. 322 // the browser side, such as changes by JavaScript or autofill.
328 void UpdateTextInputState(ShowIme show_ime, ChangeSource change_source); 323 void UpdateTextInputState(ShowIme show_ime, ChangeSource change_source);
329 #endif
330 324
331 // Called when animations due to focus change have completed (if any). Can be 325 // Called when animations due to focus change have completed (if any). Can be
332 // called from the renderer, browser, or compositor. 326 // called from the renderer, browser, or compositor.
333 virtual void FocusChangeComplete() {} 327 virtual void FocusChangeComplete() {}
334 328
335 // Checks if the composition range or composition character bounds have been 329 // Checks if the composition range or composition character bounds have been
336 // changed. If they are changed, the new value will be sent to the browser 330 // changed. If they are changed, the new value will be sent to the browser
337 // process. This method does nothing when the browser process is not able to 331 // process. This method does nothing when the browser process is not able to
338 // handle composition range and composition character bounds. 332 // handle composition range and composition character bounds.
339 void UpdateCompositionInfo(bool should_update_range); 333 void UpdateCompositionInfo(bool should_update_range);
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after
825 ui::MenuSourceType context_menu_source_type_; 819 ui::MenuSourceType context_menu_source_type_;
826 bool has_host_context_menu_location_; 820 bool has_host_context_menu_location_;
827 gfx::Point host_context_menu_location_; 821 gfx::Point host_context_menu_location_;
828 822
829 DISALLOW_COPY_AND_ASSIGN(RenderWidget); 823 DISALLOW_COPY_AND_ASSIGN(RenderWidget);
830 }; 824 };
831 825
832 } // namespace content 826 } // namespace content
833 827
834 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ 828 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698