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 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 void FinishHandlingImeEvent(); | 236 void FinishHandlingImeEvent(); |
237 | 237 |
238 // Returns whether we currently should handle an IME event. | 238 // Returns whether we currently should handle an IME event. |
239 bool ShouldHandleImeEvent(); | 239 bool ShouldHandleImeEvent(); |
240 | 240 |
241 virtual void InstrumentWillBeginFrame(int frame_id) {} | 241 virtual void InstrumentWillBeginFrame(int frame_id) {} |
242 virtual void InstrumentDidBeginFrame() {} | 242 virtual void InstrumentDidBeginFrame() {} |
243 virtual void InstrumentDidCancelFrame() {} | 243 virtual void InstrumentDidCancelFrame() {} |
244 virtual void InstrumentWillComposite() {} | 244 virtual void InstrumentWillComposite() {} |
245 | 245 |
| 246 // Called by the compositor when page scale animation completed. |
| 247 virtual void DidCompletePageScaleAnimation() {} |
| 248 |
246 // When paused in debugger, we send ack for mouse event early. This ensures | 249 // When paused in debugger, we send ack for mouse event early. This ensures |
247 // that we continue receiving mouse moves and pass them to debugger. Returns | 250 // that we continue receiving mouse moves and pass them to debugger. Returns |
248 // whether we are paused in mouse move event and have sent the ack. | 251 // whether we are paused in mouse move event and have sent the ack. |
249 bool SendAckForMouseMoveFromDebugger(); | 252 bool SendAckForMouseMoveFromDebugger(); |
250 | 253 |
251 // When resumed from pause in debugger while handling mouse move, | 254 // When resumed from pause in debugger while handling mouse move, |
252 // we should not send an extra ack (see SendAckForMouseMoveFromDebugger). | 255 // we should not send an extra ack (see SendAckForMouseMoveFromDebugger). |
253 void IgnoreAckForMouseMoveFromDebugger(); | 256 void IgnoreAckForMouseMoveFromDebugger(); |
254 | 257 |
255 // ScreenMetricsEmulator class manages screen emulation inside a render | 258 // ScreenMetricsEmulator class manages screen emulation inside a render |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 | 302 |
300 // |show_ime| should be SHOW_IME_IF_NEEDED iff the update may cause the ime to | 303 // |show_ime| should be SHOW_IME_IF_NEEDED iff the update may cause the ime to |
301 // be displayed, e.g. after a tap on an input field on mobile. | 304 // be displayed, e.g. after a tap on an input field on mobile. |
302 // |change_source| should be FROM_NON_IME when the renderer has to wait for | 305 // |change_source| should be FROM_NON_IME when the renderer has to wait for |
303 // the browser to acknowledge the change before the renderer handles any more | 306 // the browser to acknowledge the change before the renderer handles any more |
304 // IME events. This is when the text change did not originate from the IME in | 307 // IME events. This is when the text change did not originate from the IME in |
305 // the browser side, such as changes by JavaScript or autofill. | 308 // the browser side, such as changes by JavaScript or autofill. |
306 void UpdateTextInputState(ShowIme show_ime, ChangeSource change_source); | 309 void UpdateTextInputState(ShowIme show_ime, ChangeSource change_source); |
307 #endif | 310 #endif |
308 | 311 |
| 312 // Called when animations due to focus change have completed (if any). Can be |
| 313 // called from the renderer, browser, or compositor. |
| 314 virtual void FocusChangeComplete() {} |
| 315 |
309 // Checks if the composition range or composition character bounds have been | 316 // Checks if the composition range or composition character bounds have been |
310 // changed. If they are changed, the new value will be sent to the browser | 317 // changed. If they are changed, the new value will be sent to the browser |
311 // process. This method does nothing when the browser process is not able to | 318 // process. This method does nothing when the browser process is not able to |
312 // handle composition range and composition character bounds. | 319 // handle composition range and composition character bounds. |
313 void UpdateCompositionInfo(bool should_update_range); | 320 void UpdateCompositionInfo(bool should_update_range); |
314 | 321 |
315 #if defined(OS_ANDROID) | 322 #if defined(OS_ANDROID) |
316 void DidChangeBodyBackgroundColor(SkColor bg_color); | 323 void DidChangeBodyBackgroundColor(SkColor bg_color); |
317 bool DoesRecordFullLayer() const; | 324 bool DoesRecordFullLayer() const; |
318 #endif | 325 #endif |
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
789 ui::MenuSourceType context_menu_source_type_; | 796 ui::MenuSourceType context_menu_source_type_; |
790 bool has_host_context_menu_location_; | 797 bool has_host_context_menu_location_; |
791 gfx::Point host_context_menu_location_; | 798 gfx::Point host_context_menu_location_; |
792 | 799 |
793 DISALLOW_COPY_AND_ASSIGN(RenderWidget); | 800 DISALLOW_COPY_AND_ASSIGN(RenderWidget); |
794 }; | 801 }; |
795 | 802 |
796 } // namespace content | 803 } // namespace content |
797 | 804 |
798 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ | 805 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ |
OLD | NEW |