| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 755 ui::MenuSourceType context_menu_source_type_; | 756 ui::MenuSourceType context_menu_source_type_; |
| 756 bool has_host_context_menu_location_; | 757 bool has_host_context_menu_location_; |
| 757 gfx::Point host_context_menu_location_; | 758 gfx::Point host_context_menu_location_; |
| 758 | 759 |
| 759 DISALLOW_COPY_AND_ASSIGN(RenderWidget); | 760 DISALLOW_COPY_AND_ASSIGN(RenderWidget); |
| 760 }; | 761 }; |
| 761 | 762 |
| 762 } // namespace content | 763 } // namespace content |
| 763 | 764 |
| 764 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ | 765 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ |
| OLD | NEW |