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

Side by Side Diff: content/browser/renderer_host/render_widget_host_impl.h

Issue 2951053005: Add Mojo API for Blink hit testing (Closed)
Patch Set: Make the hit test API accesible by viz component Created 3 years, 4 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_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 23 matching lines...) Expand all
34 #include "content/browser/renderer_host/input/legacy_ipc_widget_input_handler.h" 34 #include "content/browser/renderer_host/input/legacy_ipc_widget_input_handler.h"
35 #include "content/browser/renderer_host/input/render_widget_host_latency_tracker .h" 35 #include "content/browser/renderer_host/input/render_widget_host_latency_tracker .h"
36 #include "content/browser/renderer_host/input/synthetic_gesture.h" 36 #include "content/browser/renderer_host/input/synthetic_gesture.h"
37 #include "content/browser/renderer_host/input/synthetic_gesture_controller.h" 37 #include "content/browser/renderer_host/input/synthetic_gesture_controller.h"
38 #include "content/browser/renderer_host/input/touch_emulator_client.h" 38 #include "content/browser/renderer_host/input/touch_emulator_client.h"
39 #include "content/browser/renderer_host/render_widget_host_delegate.h" 39 #include "content/browser/renderer_host/render_widget_host_delegate.h"
40 #include "content/browser/renderer_host/render_widget_host_view_base.h" 40 #include "content/browser/renderer_host/render_widget_host_view_base.h"
41 #include "content/common/drag_event_source_info.h" 41 #include "content/common/drag_event_source_info.h"
42 #include "content/common/input/input_event_ack_state.h" 42 #include "content/common/input/input_event_ack_state.h"
43 #include "content/common/input/input_handler.mojom.h" 43 #include "content/common/input/input_handler.mojom.h"
44 #include "content/common/input/input_hit_test.mojom.h"
44 #include "content/common/input/synthetic_gesture_packet.h" 45 #include "content/common/input/synthetic_gesture_packet.h"
45 #include "content/common/render_widget_surface_properties.h" 46 #include "content/common/render_widget_surface_properties.h"
46 #include "content/common/view_message_enums.h" 47 #include "content/common/view_message_enums.h"
47 #include "content/public/browser/render_widget_host.h" 48 #include "content/public/browser/render_widget_host.h"
48 #include "content/public/common/page_zoom.h" 49 #include "content/public/common/page_zoom.h"
49 #include "content/public/common/url_constants.h" 50 #include "content/public/common/url_constants.h"
50 #include "ipc/ipc_listener.h" 51 #include "ipc/ipc_listener.h"
51 #include "mojo/public/cpp/bindings/binding.h" 52 #include "mojo/public/cpp/bindings/binding.h"
52 #include "services/viz/public/interfaces/compositing/compositor_frame_sink.mojom .h" 53 #include "services/viz/public/interfaces/compositing/compositor_frame_sink.mojom .h"
53 #include "third_party/WebKit/public/platform/WebDisplayMode.h" 54 #include "third_party/WebKit/public/platform/WebDisplayMode.h"
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after
562 // changes, or when the text selection changes inside a frame. If both fields 563 // changes, or when the text selection changes inside a frame. If both fields
563 // are false, RenderWidget will not send any updates. To avoid sending 564 // are false, RenderWidget will not send any updates. To avoid sending
564 // unnecessary IPCs to RenderWidget (e.g., asking for monitor updates while 565 // unnecessary IPCs to RenderWidget (e.g., asking for monitor updates while
565 // we are already receiving updates), when 566 // we are already receiving updates), when
566 // |monitoring_composition_info_| == |monitor_updates| no IPC is sent to the 567 // |monitoring_composition_info_| == |monitor_updates| no IPC is sent to the
567 // renderer unless it is for an immediate request. 568 // renderer unless it is for an immediate request.
568 void RequestCompositionUpdates(bool immediate_request, bool monitor_updates); 569 void RequestCompositionUpdates(bool immediate_request, bool monitor_updates);
569 570
570 void RequestCompositorFrameSink( 571 void RequestCompositorFrameSink(
571 viz::mojom::CompositorFrameSinkRequest request, 572 viz::mojom::CompositorFrameSinkRequest request,
572 viz::mojom::CompositorFrameSinkClientPtr client); 573 viz::mojom::CompositorFrameSinkClientPtr client,
574 viz::mojom::FrameInputHitTestPtr hit_test);
573 575
574 const cc::CompositorFrameMetadata& last_frame_metadata() { 576 const cc::CompositorFrameMetadata& last_frame_metadata() {
575 return last_frame_metadata_; 577 return last_frame_metadata_;
576 } 578 }
577 579
578 bool HasGestureStopped() override; 580 bool HasGestureStopped() override;
579 581
580 // viz::mojom::CompositorFrameSink implementation. 582 // viz::mojom::CompositorFrameSink implementation.
581 void SetNeedsBeginFrame(bool needs_begin_frame) override; 583 void SetNeedsBeginFrame(bool needs_begin_frame) override;
582 void SubmitCompositorFrame(const viz::LocalSurfaceId& local_surface_id, 584 void SubmitCompositorFrame(const viz::LocalSurfaceId& local_surface_id,
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
970 #endif 972 #endif
971 973
972 // These information are used to verify that the renderer does not misbehave 974 // These information are used to verify that the renderer does not misbehave
973 // when it comes to allocating LocalSurfaceIds. If surface properties change, 975 // when it comes to allocating LocalSurfaceIds. If surface properties change,
974 // a new LocalSurfaceId must be created. 976 // a new LocalSurfaceId must be created.
975 viz::LocalSurfaceId last_local_surface_id_; 977 viz::LocalSurfaceId last_local_surface_id_;
976 RenderWidgetSurfaceProperties last_surface_properties_; 978 RenderWidgetSurfaceProperties last_surface_properties_;
977 979
978 mojo::Binding<viz::mojom::CompositorFrameSink> compositor_frame_sink_binding_; 980 mojo::Binding<viz::mojom::CompositorFrameSink> compositor_frame_sink_binding_;
979 viz::mojom::CompositorFrameSinkClientPtr renderer_compositor_frame_sink_; 981 viz::mojom::CompositorFrameSinkClientPtr renderer_compositor_frame_sink_;
982 viz::mojom::FrameInputHitTestPtr frame_hit_test_;
980 983
981 cc::CompositorFrameMetadata last_frame_metadata_; 984 cc::CompositorFrameMetadata last_frame_metadata_;
982 985
983 // Last non-zero frame token received from the renderer. Any swap messsages 986 // Last non-zero frame token received from the renderer. Any swap messsages
984 // having a token less than or equal to this value will be processed. 987 // having a token less than or equal to this value will be processed.
985 uint32_t last_received_frame_token_ = 0; 988 uint32_t last_received_frame_token_ = 0;
986 989
987 // List of all swap messages that their corresponding frames have not arrived. 990 // List of all swap messages that their corresponding frames have not arrived.
988 // Sorted by frame token. 991 // Sorted by frame token.
989 std::queue<std::pair<uint32_t, std::vector<IPC::Message>>> queued_messages_; 992 std::queue<std::pair<uint32_t, std::vector<IPC::Message>>> queued_messages_;
990 993
991 // If a CompositorFrame is submitted that references SharedBitmaps that don't 994 // If a CompositorFrame is submitted that references SharedBitmaps that don't
992 // exist yet, we keep it here until they are available. 995 // exist yet, we keep it here until they are available.
993 struct { 996 struct {
994 viz::LocalSurfaceId local_surface_id; 997 viz::LocalSurfaceId local_surface_id;
995 cc::CompositorFrame frame; 998 cc::CompositorFrame frame;
996 uint32_t max_shared_bitmap_sequence_number = 0; 999 uint32_t max_shared_bitmap_sequence_number = 0;
997 } saved_frame_; 1000 } saved_frame_;
998 1001
999 std::unique_ptr<LegacyIPCWidgetInputHandler> legacy_widget_input_handler_; 1002 std::unique_ptr<LegacyIPCWidgetInputHandler> legacy_widget_input_handler_;
1000 1003
1001 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; 1004 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_;
1002 1005
1003 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); 1006 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl);
1004 }; 1007 };
1005 1008
1006 } // namespace content 1009 } // namespace content
1007 1010
1008 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ 1011 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698