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

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

Issue 2813683002: Allow MainThreadEventQueue to call the RenderWidget directly. (Closed)
Patch Set: Created 3 years, 8 months 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 <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 94
95 namespace ui { 95 namespace ui {
96 struct DidOverscrollParams; 96 struct DidOverscrollParams;
97 } 97 }
98 98
99 namespace content { 99 namespace content {
100 class CompositorDependencies; 100 class CompositorDependencies;
101 class ExternalPopupMenu; 101 class ExternalPopupMenu;
102 class FrameSwapMessageQueue; 102 class FrameSwapMessageQueue;
103 class ImeEventGuard; 103 class ImeEventGuard;
104 class MainThreadEventQueue;
104 class PepperPluginInstanceImpl; 105 class PepperPluginInstanceImpl;
105 class RenderFrameImpl; 106 class RenderFrameImpl;
106 class RenderFrameProxy; 107 class RenderFrameProxy;
107 class RenderViewImpl; 108 class RenderViewImpl;
108 class RenderWidgetCompositor; 109 class RenderWidgetCompositor;
109 class RenderWidgetOwnerDelegate; 110 class RenderWidgetOwnerDelegate;
110 class RenderWidgetScreenMetricsEmulator; 111 class RenderWidgetScreenMetricsEmulator;
111 class ResizingModeSelector; 112 class ResizingModeSelector;
112 class TextInputClientObserver; 113 class TextInputClientObserver;
113 struct ContextMenuParams; 114 struct ContextMenuParams;
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 // RenderWidgetInputHandlerDelegate 258 // RenderWidgetInputHandlerDelegate
258 void FocusChangeComplete() override; 259 void FocusChangeComplete() override;
259 bool HasTouchEventHandlersAt(const gfx::Point& point) const override; 260 bool HasTouchEventHandlersAt(const gfx::Point& point) const override;
260 void ObserveGestureEventAndResult(const blink::WebGestureEvent& gesture_event, 261 void ObserveGestureEventAndResult(const blink::WebGestureEvent& gesture_event,
261 const gfx::Vector2dF& unused_delta, 262 const gfx::Vector2dF& unused_delta,
262 bool event_processed) override; 263 bool event_processed) override;
263 264
264 void OnDidHandleKeyEvent() override; 265 void OnDidHandleKeyEvent() override;
265 void OnDidOverscroll(const ui::DidOverscrollParams& params) override; 266 void OnDidOverscroll(const ui::DidOverscrollParams& params) override;
266 void OnInputEventAck(std::unique_ptr<InputEventAck> input_event_ack) override; 267 void OnInputEventAck(std::unique_ptr<InputEventAck> input_event_ack) override;
267 void NotifyInputEventHandled(blink::WebInputEvent::Type handled_type,
268 blink::WebInputEventResult result,
269 InputEventAckState ack_result) override;
270 void SetInputHandler(RenderWidgetInputHandler* input_handler) override; 268 void SetInputHandler(RenderWidgetInputHandler* input_handler) override;
271 void ShowVirtualKeyboard() override; 269 void ShowVirtualKeyboard() override;
272 void UpdateTextInputState() override; 270 void UpdateTextInputState() override;
273 void ClearTextInputState() override; 271 void ClearTextInputState() override;
274 bool WillHandleGestureEvent(const blink::WebGestureEvent& event) override; 272 bool WillHandleGestureEvent(const blink::WebGestureEvent& event) override;
275 bool WillHandleMouseEvent(const blink::WebMouseEvent& event) override; 273 bool WillHandleMouseEvent(const blink::WebMouseEvent& event) override;
276 274
277 // RenderWidgetScreenMetricsDelegate 275 // RenderWidgetScreenMetricsDelegate
278 void Redraw() override; 276 void Redraw() override;
279 void Resize(const ResizeParams& resize_params) override; 277 void Resize(const ResizeParams& resize_params) override;
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 407
410 // Helper to convert |point| using ConvertWindowToViewport(). 408 // Helper to convert |point| using ConvertWindowToViewport().
411 gfx::Point ConvertWindowPointToViewport(const gfx::Point& point); 409 gfx::Point ConvertWindowPointToViewport(const gfx::Point& point);
412 410
413 virtual void TransferActiveWheelFlingAnimation( 411 virtual void TransferActiveWheelFlingAnimation(
414 const blink::WebActiveWheelFlingParameters& params) {} 412 const blink::WebActiveWheelFlingParameters& params) {}
415 413
416 uint32_t GetContentSourceId(); 414 uint32_t GetContentSourceId();
417 void IncrementContentSourceId(); 415 void IncrementContentSourceId();
418 416
417 virtual InputEventAckState HandleInputEvent(
418 const blink::WebCoalescedInputEvent& input_event,
419 const ui::LatencyInfo& latency_info,
420 InputEventDispatchType dispatch_type);
421
419 protected: 422 protected:
420 // Friend RefCounted so that the dtor can be non-public. Using this class 423 // Friend RefCounted so that the dtor can be non-public. Using this class
421 // without ref-counting is an error. 424 // without ref-counting is an error.
422 friend class base::RefCounted<RenderWidget>; 425 friend class base::RefCounted<RenderWidget>;
423 426
424 // For unit tests. 427 // For unit tests.
425 friend class RenderWidgetTest; 428 friend class RenderWidgetTest;
426 429
427 enum ResizeAck { 430 enum ResizeAck {
428 SEND_RESIZE_ACK, 431 SEND_RESIZE_ACK,
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
861 // responsible for sending it to the browser process to be used to match 864 // responsible for sending it to the browser process to be used to match
862 // each compositor frame to the most recent page navigation before it was 865 // each compositor frame to the most recent page navigation before it was
863 // generated. 866 // generated.
864 // This only applies to main frames, and is not touched for subframe 867 // This only applies to main frames, and is not touched for subframe
865 // RenderWidgets, where there is no concern around displaying unloaded 868 // RenderWidgets, where there is no concern around displaying unloaded
866 // content. 869 // content.
867 // TODO(kenrb, fsamuel): This should be removed when SurfaceIDs can be used 870 // TODO(kenrb, fsamuel): This should be removed when SurfaceIDs can be used
868 // to replace it. See https://crbug.com/695579. 871 // to replace it. See https://crbug.com/695579.
869 uint32_t current_content_source_id_; 872 uint32_t current_content_source_id_;
870 873
874 scoped_refptr<MainThreadEventQueue> input_event_queue_;
875
871 base::WeakPtrFactory<RenderWidget> weak_ptr_factory_; 876 base::WeakPtrFactory<RenderWidget> weak_ptr_factory_;
872 877
873 DISALLOW_COPY_AND_ASSIGN(RenderWidget); 878 DISALLOW_COPY_AND_ASSIGN(RenderWidget);
874 }; 879 };
875 880
876 } // namespace content 881 } // namespace content
877 882
878 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ 883 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698