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

Side by Side Diff: content/browser/frame_host/cross_process_frame_connector.h

Issue 2184033003: Refactor browser process coordinate transformation methods (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_FRAME_HOST_CROSS_PROCESS_FRAME_CONNECTOR_H_ 5 #ifndef CONTENT_BROWSER_FRAME_HOST_CROSS_PROCESS_FRAME_CONNECTOR_H_
6 #define CONTENT_BROWSER_FRAME_HOST_CROSS_PROCESS_FRAME_CONNECTOR_H_ 6 #define CONTENT_BROWSER_FRAME_HOST_CROSS_PROCESS_FRAME_CONNECTOR_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "cc/output/compositor_frame.h" 10 #include "cc/output/compositor_frame.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 virtual void SetChildFrameSurface(const cc::SurfaceId& surface_id, 90 virtual void SetChildFrameSurface(const cc::SurfaceId& surface_id,
91 const gfx::Size& frame_size, 91 const gfx::Size& frame_size,
92 float scale_factor, 92 float scale_factor,
93 const cc::SurfaceSequence& sequence); 93 const cc::SurfaceSequence& sequence);
94 94
95 gfx::Rect ChildFrameRect(); 95 gfx::Rect ChildFrameRect();
96 float device_scale_factor() const { return device_scale_factor_; } 96 float device_scale_factor() const { return device_scale_factor_; }
97 void GetScreenInfo(blink::WebScreenInfo* results); 97 void GetScreenInfo(blink::WebScreenInfo* results);
98 void UpdateCursor(const WebCursor& cursor); 98 void UpdateCursor(const WebCursor& cursor);
99 gfx::Point TransformPointToRootCoordSpace(const gfx::Point& point, 99 gfx::Point TransformPointToRootCoordSpace(const gfx::Point& point,
100 cc::SurfaceId surface_id); 100 const cc::SurfaceId& surface_id);
101 // TransformPointToLocalCoordSpace() can only transform points between
102 // surfaces where one is embedded (not necessarily directly) within the
103 // other. For points that can be in sibling surfaces, they must first be
104 // converted to the root surface's coordinate space.
105 gfx::Point TransformPointToLocalCoordSpace(
106 const gfx::Point& point,
107 const cc::SurfaceId& original_surface,
108 const cc::SurfaceId& local_surface_id);
109 gfx::Point TransformPointToCoordSpaceForView(
nasko 2016/07/27 22:52:13 bikeshed: TransformPointToViewCoordSpace? Since yo
kenrb 2016/07/28 16:24:37 I feel like it is slightly more intuitive as it is
110 const gfx::Point& point,
111 RenderWidgetHostViewBase* target_view,
112 const cc::SurfaceId& local_surface_id);
113
101 // Pass acked touch events to the root view for gesture processing. 114 // Pass acked touch events to the root view for gesture processing.
102 void ForwardProcessAckedTouchEvent(const TouchEventWithLatencyInfo& touch, 115 void ForwardProcessAckedTouchEvent(const TouchEventWithLatencyInfo& touch,
103 InputEventAckState ack_result); 116 InputEventAckState ack_result);
104 // Gesture events with unused scroll deltas must be bubbled to ancestors 117 // Gesture events with unused scroll deltas must be bubbled to ancestors
105 // who may consume the delta. 118 // who may consume the delta.
106 void BubbleScrollEvent(const blink::WebGestureEvent& event); 119 void BubbleScrollEvent(const blink::WebGestureEvent& event);
107 120
108 // Determines whether the root RenderWidgetHostView (and thus the current 121 // Determines whether the root RenderWidgetHostView (and thus the current
109 // page) has focus. 122 // page) has focus.
110 bool HasFocus(); 123 bool HasFocus();
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 gfx::Rect child_frame_rect_; 164 gfx::Rect child_frame_rect_;
152 float device_scale_factor_; 165 float device_scale_factor_;
153 166
154 bool is_scroll_bubbling_; 167 bool is_scroll_bubbling_;
155 }; 168 };
156 169
157 } // namespace content 170 } // namespace content
158 171
159 #endif // CONTENT_BROWSER_FRAME_HOST_CROSS_PROCESS_FRAME_CONNECTOR_H_ 172 #endif // CONTENT_BROWSER_FRAME_HOST_CROSS_PROCESS_FRAME_CONNECTOR_H_
160 173
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698