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

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: Address Rob's comments 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 551 matching lines...) Expand 10 before | Expand all | Expand 10 after
562 // changes, or when the text selection changes inside a frame. If both fields 562 // 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 563 // are false, RenderWidget will not send any updates. To avoid sending
564 // unnecessary IPCs to RenderWidget (e.g., asking for monitor updates while 564 // unnecessary IPCs to RenderWidget (e.g., asking for monitor updates while
565 // we are already receiving updates), when 565 // we are already receiving updates), when
566 // |monitoring_composition_info_| == |monitor_updates| no IPC is sent to the 566 // |monitoring_composition_info_| == |monitor_updates| no IPC is sent to the
567 // renderer unless it is for an immediate request. 567 // renderer unless it is for an immediate request.
568 void RequestCompositionUpdates(bool immediate_request, bool monitor_updates); 568 void RequestCompositionUpdates(bool immediate_request, bool monitor_updates);
569 569
570 void RequestCompositorFrameSink( 570 void RequestCompositorFrameSink(
571 viz::mojom::CompositorFrameSinkRequest request, 571 viz::mojom::CompositorFrameSinkRequest request,
572 viz::mojom::CompositorFrameSinkClientPtr client); 572 viz::mojom::CompositorFrameSinkClientPtr client,
573 viz::mojom::TargetFrameForInputDelegatePtr hit_test);
573 574
574 const cc::CompositorFrameMetadata& last_frame_metadata() { 575 const cc::CompositorFrameMetadata& last_frame_metadata() {
575 return last_frame_metadata_; 576 return last_frame_metadata_;
576 } 577 }
577 578
578 bool HasGestureStopped() override; 579 bool HasGestureStopped() override;
579 580
580 // viz::mojom::CompositorFrameSink implementation. 581 // viz::mojom::CompositorFrameSink implementation.
581 void SetNeedsBeginFrame(bool needs_begin_frame) override; 582 void SetNeedsBeginFrame(bool needs_begin_frame) override;
582 void SubmitCompositorFrame(const viz::LocalSurfaceId& local_surface_id, 583 void SubmitCompositorFrame(const viz::LocalSurfaceId& local_surface_id,
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
970 #endif 971 #endif
971 972
972 // These information are used to verify that the renderer does not misbehave 973 // These information are used to verify that the renderer does not misbehave
973 // when it comes to allocating LocalSurfaceIds. If surface properties change, 974 // when it comes to allocating LocalSurfaceIds. If surface properties change,
974 // a new LocalSurfaceId must be created. 975 // a new LocalSurfaceId must be created.
975 viz::LocalSurfaceId last_local_surface_id_; 976 viz::LocalSurfaceId last_local_surface_id_;
976 RenderWidgetSurfaceProperties last_surface_properties_; 977 RenderWidgetSurfaceProperties last_surface_properties_;
977 978
978 mojo::Binding<viz::mojom::CompositorFrameSink> compositor_frame_sink_binding_; 979 mojo::Binding<viz::mojom::CompositorFrameSink> compositor_frame_sink_binding_;
979 viz::mojom::CompositorFrameSinkClientPtr renderer_compositor_frame_sink_; 980 viz::mojom::CompositorFrameSinkClientPtr renderer_compositor_frame_sink_;
981 viz::mojom::TargetFrameForInputDelegatePtr target_frame_for_input_delegate_;
980 982
981 cc::CompositorFrameMetadata last_frame_metadata_; 983 cc::CompositorFrameMetadata last_frame_metadata_;
982 984
983 // Last non-zero frame token received from the renderer. Any swap messsages 985 // 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. 986 // having a token less than or equal to this value will be processed.
985 uint32_t last_received_frame_token_ = 0; 987 uint32_t last_received_frame_token_ = 0;
986 988
987 // List of all swap messages that their corresponding frames have not arrived. 989 // List of all swap messages that their corresponding frames have not arrived.
988 // Sorted by frame token. 990 // Sorted by frame token.
989 std::queue<std::pair<uint32_t, std::vector<IPC::Message>>> queued_messages_; 991 std::queue<std::pair<uint32_t, std::vector<IPC::Message>>> queued_messages_;
990 992
991 // If a CompositorFrame is submitted that references SharedBitmaps that don't 993 // If a CompositorFrame is submitted that references SharedBitmaps that don't
992 // exist yet, we keep it here until they are available. 994 // exist yet, we keep it here until they are available.
993 struct { 995 struct {
994 viz::LocalSurfaceId local_surface_id; 996 viz::LocalSurfaceId local_surface_id;
995 cc::CompositorFrame frame; 997 cc::CompositorFrame frame;
996 uint32_t max_shared_bitmap_sequence_number = 0; 998 uint32_t max_shared_bitmap_sequence_number = 0;
997 } saved_frame_; 999 } saved_frame_;
998 1000
999 std::unique_ptr<LegacyIPCWidgetInputHandler> legacy_widget_input_handler_; 1001 std::unique_ptr<LegacyIPCWidgetInputHandler> legacy_widget_input_handler_;
1000 1002
1001 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; 1003 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_;
1002 1004
1003 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); 1005 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl);
1004 }; 1006 };
1005 1007
1006 } // namespace content 1008 } // namespace content
1007 1009
1008 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ 1010 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/frame_sink_provider_impl.cc ('k') | content/browser/renderer_host/render_widget_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698