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

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

Issue 671503005: Plumb composition character bounds for Android 5.0 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 1 month 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 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 285
286 // |show_ime| should be SHOW_IME_IF_NEEDED iff the update may cause the ime to 286 // |show_ime| should be SHOW_IME_IF_NEEDED iff the update may cause the ime to
287 // be displayed, e.g. after a tap on an input field on mobile. 287 // be displayed, e.g. after a tap on an input field on mobile.
288 // |change_source| should be FROM_NON_IME when the renderer has to wait for 288 // |change_source| should be FROM_NON_IME when the renderer has to wait for
289 // the browser to acknowledge the change before the renderer handles any more 289 // the browser to acknowledge the change before the renderer handles any more
290 // IME events. This is when the text change did not originate from the IME in 290 // IME events. This is when the text change did not originate from the IME in
291 // the browser side, such as changes by JavaScript or autofill. 291 // the browser side, such as changes by JavaScript or autofill.
292 void UpdateTextInputState(ShowIme show_ime, ChangeSource change_source); 292 void UpdateTextInputState(ShowIme show_ime, ChangeSource change_source);
293 #endif 293 #endif
294 294
295 #if defined(OS_MACOSX) || defined(USE_AURA) 295 #if defined(OS_MACOSX) || defined(USE_AURA) || defined(OS_ANDROID)
296 // Checks if the composition range or composition character bounds have been 296 // Checks if the composition range or composition character bounds have been
297 // changed. If they are changed, the new value will be sent to the browser 297 // changed. If they are changed, the new value will be sent to the browser
298 // process. 298 // process. This method does nothing when the browser process is not able to
299 // handle composition range and composition character bounds.
299 void UpdateCompositionInfo(bool should_update_range); 300 void UpdateCompositionInfo(bool should_update_range);
300 #endif 301 #endif
301 302
302 #if defined(OS_ANDROID) 303 #if defined(OS_ANDROID)
303 void DidChangeBodyBackgroundColor(SkColor bg_color); 304 void DidChangeBodyBackgroundColor(SkColor bg_color);
304 #endif 305 #endif
305 306
306 protected: 307 protected:
307 // Friend RefCounted so that the dtor can be non-public. Using this class 308 // Friend RefCounted so that the dtor can be non-public. Using this class
308 // without ref-counting is an error. 309 // without ref-counting is an error.
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 scoped_refptr<IPC::SyncMessageFilter> sync_message_filter, 465 scoped_refptr<IPC::SyncMessageFilter> sync_message_filter,
465 bool commit_requested, 466 bool commit_requested,
466 int source_frame_number); 467 int source_frame_number);
467 468
468 // Override point to obtain that the current input method state and caret 469 // Override point to obtain that the current input method state and caret
469 // position. 470 // position.
470 virtual ui::TextInputType GetTextInputType(); 471 virtual ui::TextInputType GetTextInputType();
471 virtual ui::TextInputType WebKitToUiTextInputType( 472 virtual ui::TextInputType WebKitToUiTextInputType(
472 blink::WebTextInputType type); 473 blink::WebTextInputType type);
473 474
474 #if defined(OS_MACOSX) || defined(USE_AURA) 475 #if defined(OS_MACOSX) || defined(USE_AURA) || defined(OS_ANDROID)
475 // Override point to obtain that the current composition character bounds. 476 // Override point to obtain that the current composition character bounds.
476 // In the case of surrogate pairs, the character is treated as two characters: 477 // In the case of surrogate pairs, the character is treated as two characters:
477 // the bounds for first character is actual one, and the bounds for second 478 // the bounds for first character is actual one, and the bounds for second
478 // character is zero width rectangle. 479 // character is zero width rectangle.
479 virtual void GetCompositionCharacterBounds( 480 virtual void GetCompositionCharacterBounds(
480 std::vector<gfx::Rect>* character_bounds); 481 std::vector<gfx::Rect>* character_bounds);
481 482
482 // Returns the range of the text that is being composed or the selection if 483 // Returns the range of the text that is being composed or the selection if
483 // the composition does not exist. 484 // the composition does not exist.
484 virtual void GetCompositionRange(gfx::Range* range); 485 virtual void GetCompositionRange(gfx::Range* range);
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
758 ui::MenuSourceType context_menu_source_type_; 759 ui::MenuSourceType context_menu_source_type_;
759 bool has_host_context_menu_location_; 760 bool has_host_context_menu_location_;
760 gfx::Point host_context_menu_location_; 761 gfx::Point host_context_menu_location_;
761 762
762 DISALLOW_COPY_AND_ASSIGN(RenderWidget); 763 DISALLOW_COPY_AND_ASSIGN(RenderWidget);
763 }; 764 };
764 765
765 } // namespace content 766 } // namespace content
766 767
767 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ 768 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698