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

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

Issue 2910023002: Ensure RemoteViewportIntersection rect persists across frame navigations (Closed)
Patch Set: Created 3 years, 6 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 10 matching lines...) Expand all
21 class SurfaceId; 21 class SurfaceId;
22 class SurfaceInfo; 22 class SurfaceInfo;
23 struct SurfaceSequence; 23 struct SurfaceSequence;
24 } 24 }
25 25
26 namespace IPC { 26 namespace IPC {
27 class Message; 27 class Message;
28 } 28 }
29 29
30 namespace content { 30 namespace content {
31 class MockCrossProcessFrameConnector;
ncarter (slow) 2017/05/30 17:51:09 "friend class" doesn't actually require forward de
kenrb 2017/05/30 18:25:10 Done.
31 class RenderFrameProxyHost; 32 class RenderFrameProxyHost;
32 class RenderWidgetHostViewBase; 33 class RenderWidgetHostViewBase;
33 class RenderWidgetHostViewChildFrame; 34 class RenderWidgetHostViewChildFrame;
34 class WebCursor; 35 class WebCursor;
35 36
36 // CrossProcessFrameConnector provides the platform view abstraction for 37 // CrossProcessFrameConnector provides the platform view abstraction for
37 // RenderWidgetHostViewChildFrame allowing RWHVChildFrame to remain ignorant 38 // RenderWidgetHostViewChildFrame allowing RWHVChildFrame to remain ignorant
38 // of RenderFrameHost. 39 // of RenderFrameHost.
39 // 40 //
40 // The RenderWidgetHostView of an out-of-process child frame needs to 41 // The RenderWidgetHostView of an out-of-process child frame needs to
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 127
127 // Unlocks the mouse if the mouse is locked. 128 // Unlocks the mouse if the mouse is locked.
128 void UnlockMouse(); 129 void UnlockMouse();
129 130
130 // Returns the parent RenderWidgetHostView or nullptr it it doesn't have one. 131 // Returns the parent RenderWidgetHostView or nullptr it it doesn't have one.
131 virtual RenderWidgetHostViewBase* GetParentRenderWidgetHostView(); 132 virtual RenderWidgetHostViewBase* GetParentRenderWidgetHostView();
132 133
133 // Returns the view for the top-level frame under the same WebContents. 134 // Returns the view for the top-level frame under the same WebContents.
134 RenderWidgetHostViewBase* GetRootRenderWidgetHostView(); 135 RenderWidgetHostViewBase* GetRootRenderWidgetHostView();
135 136
137 gfx::Rect viewport_intersection() const {
138 return viewport_intersection_rect_;
139 }
140
136 // Exposed for tests. 141 // Exposed for tests.
137 RenderWidgetHostViewBase* GetRootRenderWidgetHostViewForTesting() { 142 RenderWidgetHostViewBase* GetRootRenderWidgetHostViewForTesting() {
138 return GetRootRenderWidgetHostView(); 143 return GetRootRenderWidgetHostView();
139 } 144 }
140 145
141 private: 146 private:
147 friend class MockCrossProcessFrameConnector;
148
142 // Handlers for messages received from the parent frame. 149 // Handlers for messages received from the parent frame.
143 void OnFrameRectChanged(const gfx::Rect& frame_rect); 150 void OnFrameRectChanged(const gfx::Rect& frame_rect);
144 void OnUpdateViewportIntersection(const gfx::Rect& viewport_intersection); 151 void OnUpdateViewportIntersection(const gfx::Rect& viewport_intersection);
145 void OnVisibilityChanged(bool visible); 152 void OnVisibilityChanged(bool visible);
146 void OnSatisfySequence(const cc::SurfaceSequence& sequence); 153 void OnSatisfySequence(const cc::SurfaceSequence& sequence);
147 void OnRequireSequence(const cc::SurfaceId& id, 154 void OnRequireSequence(const cc::SurfaceId& id,
148 const cc::SurfaceSequence& sequence); 155 const cc::SurfaceSequence& sequence);
149 156
150 void SetRect(const gfx::Rect& frame_rect); 157 void SetRect(const gfx::Rect& frame_rect);
151 158
152 // The RenderFrameProxyHost that routes messages to the parent frame's 159 // The RenderFrameProxyHost that routes messages to the parent frame's
153 // renderer process. 160 // renderer process.
154 RenderFrameProxyHost* frame_proxy_in_parent_renderer_; 161 RenderFrameProxyHost* frame_proxy_in_parent_renderer_;
155 162
156 // The RenderWidgetHostView for the frame. Initially NULL. 163 // The RenderWidgetHostView for the frame. Initially NULL.
157 RenderWidgetHostViewChildFrame* view_; 164 RenderWidgetHostViewChildFrame* view_;
158 165
159 gfx::Rect child_frame_rect_; 166 gfx::Rect child_frame_rect_;
167 gfx::Rect viewport_intersection_rect_;
160 168
161 bool is_scroll_bubbling_; 169 bool is_scroll_bubbling_;
162 }; 170 };
163 171
164 } // namespace content 172 } // namespace content
165 173
166 #endif // CONTENT_BROWSER_FRAME_HOST_CROSS_PROCESS_FRAME_CONNECTOR_H_ 174 #endif // CONTENT_BROWSER_FRAME_HOST_CROSS_PROCESS_FRAME_CONNECTOR_H_
167 175
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698