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_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
316 const blink::WebGestureEvent& gesture_event, | 316 const blink::WebGestureEvent& gesture_event, |
317 const ui::LatencyInfo& ui_latency) override; | 317 const ui::LatencyInfo& ui_latency) override; |
318 virtual void ForwardTouchEventWithLatencyInfo( | 318 virtual void ForwardTouchEventWithLatencyInfo( |
319 const blink::WebTouchEvent& touch_event, | 319 const blink::WebTouchEvent& touch_event, |
320 const ui::LatencyInfo& ui_latency); // Virtual for testing. | 320 const ui::LatencyInfo& ui_latency); // Virtual for testing. |
321 void ForwardMouseEventWithLatencyInfo( | 321 void ForwardMouseEventWithLatencyInfo( |
322 const blink::WebMouseEvent& mouse_event, | 322 const blink::WebMouseEvent& mouse_event, |
323 const ui::LatencyInfo& ui_latency); | 323 const ui::LatencyInfo& ui_latency); |
324 virtual void ForwardWheelEventWithLatencyInfo( | 324 virtual void ForwardWheelEventWithLatencyInfo( |
325 const blink::WebMouseWheelEvent& wheel_event, | 325 const blink::WebMouseWheelEvent& wheel_event, |
326 const ui::LatencyInfo& ui_latency); // Virtual for testing. | 326 const ui::LatencyInfo& ui_latency); // Virtual for testing. |
327 | 327 |
328 // Enables/disables touch emulation using mouse event. See TouchEmulator. | 328 // Enables/disables touch emulation using mouse event. See TouchEmulator. |
329 void SetTouchEventEmulationEnabled( | 329 void SetTouchEventEmulationEnabled( |
330 bool enabled, ui::GestureProviderConfigType config_type); | 330 bool enabled, ui::GestureProviderConfigType config_type); |
331 | 331 |
332 // TouchEmulatorClient implementation. | 332 // TouchEmulatorClient implementation. |
333 void ForwardEmulatedGestureEvent( | 333 void ForwardEmulatedGestureEvent( |
334 const blink::WebGestureEvent& gesture_event) override; | 334 const blink::WebGestureEvent& gesture_event) override; |
335 void ForwardEmulatedTouchEvent( | 335 void ForwardEmulatedTouchEvent( |
336 const blink::WebTouchEvent& touch_event) override; | 336 const blink::WebTouchEvent& touch_event) override; |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
511 | 511 |
512 // Sets the |resize_params| that were sent to the renderer bundled with the | 512 // Sets the |resize_params| that were sent to the renderer bundled with the |
513 // request to create a new RenderWidget. | 513 // request to create a new RenderWidget. |
514 void SetInitialRenderSizeParams(const ResizeParams& resize_params); | 514 void SetInitialRenderSizeParams(const ResizeParams& resize_params); |
515 | 515 |
516 // Called when we receive a notification indicating that the renderer process | 516 // Called when we receive a notification indicating that the renderer process |
517 // is gone. This will reset our state so that our state will be consistent if | 517 // is gone. This will reset our state so that our state will be consistent if |
518 // a new renderer is created. | 518 // a new renderer is created. |
519 void RendererExited(base::TerminationStatus status, int exit_code); | 519 void RendererExited(base::TerminationStatus status, int exit_code); |
520 | 520 |
| 521 // Called from a RenderFrameHost when the text selection has changed. |
| 522 void OnSelectionChanged(const base::string16& text, |
| 523 uint32_t offset, |
| 524 const gfx::Range& range); |
| 525 |
521 // Expose increment/decrement of the in-flight event count, so | 526 // Expose increment/decrement of the in-flight event count, so |
522 // RenderViewHostImpl can account for in-flight beforeunload/unload events. | 527 // RenderViewHostImpl can account for in-flight beforeunload/unload events. |
523 int increment_in_flight_event_count() { return ++in_flight_event_count_; } | 528 int increment_in_flight_event_count() { return ++in_flight_event_count_; } |
524 int decrement_in_flight_event_count() { | 529 int decrement_in_flight_event_count() { |
525 DCHECK_GT(in_flight_event_count_, 0); | 530 DCHECK_GT(in_flight_event_count_, 0); |
526 return --in_flight_event_count_; | 531 return --in_flight_event_count_; |
527 } | 532 } |
528 | 533 |
529 bool renderer_initialized() const { return renderer_initialized_; } | 534 bool renderer_initialized() const { return renderer_initialized_; } |
530 | 535 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
586 const gfx::Range& range, | 591 const gfx::Range& range, |
587 const std::vector<gfx::Rect>& character_bounds); | 592 const std::vector<gfx::Rect>& character_bounds); |
588 void OnImeCancelComposition(); | 593 void OnImeCancelComposition(); |
589 void OnLockMouse(bool user_gesture, | 594 void OnLockMouse(bool user_gesture, |
590 bool last_unlocked_by_target, | 595 bool last_unlocked_by_target, |
591 bool privileged); | 596 bool privileged); |
592 void OnUnlockMouse(); | 597 void OnUnlockMouse(); |
593 void OnShowDisambiguationPopup(const gfx::Rect& rect_pixels, | 598 void OnShowDisambiguationPopup(const gfx::Rect& rect_pixels, |
594 const gfx::Size& size, | 599 const gfx::Size& size, |
595 const cc::SharedBitmapId& id); | 600 const cc::SharedBitmapId& id); |
596 void OnSelectionChanged(const base::string16& text, | |
597 uint32_t offset, | |
598 const gfx::Range& range); | |
599 void OnSelectionBoundsChanged( | 601 void OnSelectionBoundsChanged( |
600 const ViewHostMsg_SelectionBounds_Params& params); | 602 const ViewHostMsg_SelectionBounds_Params& params); |
601 void OnForwardCompositorProto(const std::vector<uint8_t>& proto); | 603 void OnForwardCompositorProto(const std::vector<uint8_t>& proto); |
602 void OnSetNeedsBeginFrames(bool needs_begin_frames); | 604 void OnSetNeedsBeginFrames(bool needs_begin_frames); |
603 void OnHittestData(const FrameHostMsg_HittestData_Params& params); | 605 void OnHittestData(const FrameHostMsg_HittestData_Params& params); |
604 | 606 |
605 // Called (either immediately or asynchronously) after we're done with our | 607 // Called (either immediately or asynchronously) after we're done with our |
606 // BackingStore and can send an ACK to the renderer so it can paint onto it | 608 // BackingStore and can send an ACK to the renderer so it can paint onto it |
607 // again. | 609 // again. |
608 void DidUpdateBackingStore(const ViewHostMsg_UpdateRect_Params& params, | 610 void DidUpdateBackingStore(const ViewHostMsg_UpdateRect_Params& params, |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
845 #endif | 847 #endif |
846 | 848 |
847 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; | 849 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; |
848 | 850 |
849 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); | 851 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); |
850 }; | 852 }; |
851 | 853 |
852 } // namespace content | 854 } // namespace content |
853 | 855 |
854 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ | 856 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ |
OLD | NEW |