| 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 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 void SetPopupOriginAdjustmentsForEmulation(ScreenMetricsEmulator* emulator); | 228 void SetPopupOriginAdjustmentsForEmulation(ScreenMetricsEmulator* emulator); |
| 229 | 229 |
| 230 void ScheduleCompositeWithForcedRedraw(); | 230 void ScheduleCompositeWithForcedRedraw(); |
| 231 | 231 |
| 232 // Called by the compositor in single-threaded mode when a swap is posted, | 232 // Called by the compositor in single-threaded mode when a swap is posted, |
| 233 // completes or is aborted. | 233 // completes or is aborted. |
| 234 void OnSwapBuffersPosted(); | 234 void OnSwapBuffersPosted(); |
| 235 void OnSwapBuffersComplete(); | 235 void OnSwapBuffersComplete(); |
| 236 void OnSwapBuffersAborted(); | 236 void OnSwapBuffersAborted(); |
| 237 | 237 |
| 238 // Checks if the text input state and compose inline mode have been changed. | |
| 239 // If they are changed, the new value will be sent to the browser process. | |
| 240 void UpdateTextInputType(); | |
| 241 | |
| 242 // Checks if the selection bounds have been changed. If they are changed, | 238 // Checks if the selection bounds have been changed. If they are changed, |
| 243 // the new value will be sent to the browser process. | 239 // the new value will be sent to the browser process. |
| 244 void UpdateSelectionBounds(); | 240 void UpdateSelectionBounds(); |
| 245 | 241 |
| 246 virtual void GetSelectionBounds(gfx::Rect* start, gfx::Rect* end); | 242 virtual void GetSelectionBounds(gfx::Rect* start, gfx::Rect* end); |
| 247 | 243 |
| 248 void OnShowHostContextMenu(ContextMenuParams* params); | 244 void OnShowHostContextMenu(ContextMenuParams* params); |
| 249 | 245 |
| 250 #if defined(OS_ANDROID) || defined(USE_AURA) | |
| 251 enum ShowIme { | 246 enum ShowIme { |
| 252 SHOW_IME_IF_NEEDED, | 247 SHOW_IME_IF_NEEDED, |
| 253 NO_SHOW_IME, | 248 NO_SHOW_IME, |
| 254 }; | 249 }; |
| 255 | 250 |
| 256 enum ChangeSource { | 251 enum ChangeSource { |
| 257 FROM_NON_IME, | 252 FROM_NON_IME, |
| 258 FROM_IME, | 253 FROM_IME, |
| 259 }; | 254 }; |
| 260 | 255 |
| 261 // |show_ime| should be SHOW_IME_IF_NEEDED iff the update may cause the ime to | 256 // |show_ime| should be SHOW_IME_IF_NEEDED iff the update may cause the ime to |
| 262 // be displayed, e.g. after a tap on an input field on mobile. | 257 // be displayed, e.g. after a tap on an input field on mobile. |
| 263 // |change_source| should be FROM_NON_IME when the renderer has to wait for | 258 // |change_source| should be FROM_NON_IME when the renderer has to wait for |
| 264 // the browser to acknowledge the change before the renderer handles any more | 259 // the browser to acknowledge the change before the renderer handles any more |
| 265 // IME events. This is when the text change did not originate from the IME in | 260 // IME events. This is when the text change did not originate from the IME in |
| 266 // the browser side, such as changes by JavaScript or autofill. | 261 // the browser side, such as changes by JavaScript or autofill. |
| 267 void UpdateTextInputState(ShowIme show_ime, ChangeSource change_source); | 262 void UpdateTextInputState(ShowIme show_ime, ChangeSource change_source); |
| 268 #endif | |
| 269 | 263 |
| 270 #if defined(OS_MACOSX) || defined(USE_AURA) | 264 #if defined(OS_MACOSX) || defined(USE_AURA) |
| 271 // Checks if the composition range or composition character bounds have been | 265 // Checks if the composition range or composition character bounds have been |
| 272 // changed. If they are changed, the new value will be sent to the browser | 266 // changed. If they are changed, the new value will be sent to the browser |
| 273 // process. | 267 // process. |
| 274 void UpdateCompositionInfo(bool should_update_range); | 268 void UpdateCompositionInfo(bool should_update_range); |
| 275 #endif | 269 #endif |
| 276 | 270 |
| 277 #if defined(OS_ANDROID) | 271 #if defined(OS_ANDROID) |
| 278 void DidChangeBodyBackgroundColor(SkColor bg_color); | 272 void DidChangeBodyBackgroundColor(SkColor bg_color); |
| (...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 712 | 706 |
| 713 ui::MenuSourceType context_menu_source_type_; | 707 ui::MenuSourceType context_menu_source_type_; |
| 714 gfx::Point touch_editing_context_menu_location_; | 708 gfx::Point touch_editing_context_menu_location_; |
| 715 | 709 |
| 716 DISALLOW_COPY_AND_ASSIGN(RenderWidget); | 710 DISALLOW_COPY_AND_ASSIGN(RenderWidget); |
| 717 }; | 711 }; |
| 718 | 712 |
| 719 } // namespace content | 713 } // namespace content |
| 720 | 714 |
| 721 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ | 715 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ |
| OLD | NEW |