OLD | NEW |
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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 // Returns the parent RenderWidgetHostView or nullptr it it doesn't have one. | 130 // Returns the parent RenderWidgetHostView or nullptr it it doesn't have one. |
131 virtual RenderWidgetHostViewBase* GetParentRenderWidgetHostView(); | 131 virtual RenderWidgetHostViewBase* GetParentRenderWidgetHostView(); |
132 | 132 |
133 // Returns the view for the top-level frame under the same WebContents. | 133 // Returns the view for the top-level frame under the same WebContents. |
134 RenderWidgetHostViewBase* GetRootRenderWidgetHostView(); | 134 RenderWidgetHostViewBase* GetRootRenderWidgetHostView(); |
135 | 135 |
136 const gfx::Rect& viewport_intersection() const { | 136 const gfx::Rect& viewport_intersection() const { |
137 return viewport_intersection_rect_; | 137 return viewport_intersection_rect_; |
138 } | 138 } |
139 | 139 |
| 140 bool is_inert() const { return is_inert_; } |
| 141 |
140 // Exposed for tests. | 142 // Exposed for tests. |
141 RenderWidgetHostViewBase* GetRootRenderWidgetHostViewForTesting() { | 143 RenderWidgetHostViewBase* GetRootRenderWidgetHostViewForTesting() { |
142 return GetRootRenderWidgetHostView(); | 144 return GetRootRenderWidgetHostView(); |
143 } | 145 } |
144 | 146 |
145 private: | 147 private: |
146 friend class MockCrossProcessFrameConnector; | 148 friend class MockCrossProcessFrameConnector; |
147 | 149 |
148 // Handlers for messages received from the parent frame. | 150 // Handlers for messages received from the parent frame. |
149 void OnFrameRectChanged(const gfx::Rect& frame_rect); | 151 void OnFrameRectChanged(const gfx::Rect& frame_rect); |
150 void OnUpdateViewportIntersection(const gfx::Rect& viewport_intersection); | 152 void OnUpdateViewportIntersection(const gfx::Rect& viewport_intersection); |
151 void OnVisibilityChanged(bool visible); | 153 void OnVisibilityChanged(bool visible); |
| 154 void OnSetIsInert(bool); |
152 void OnSatisfySequence(const cc::SurfaceSequence& sequence); | 155 void OnSatisfySequence(const cc::SurfaceSequence& sequence); |
153 void OnRequireSequence(const cc::SurfaceId& id, | 156 void OnRequireSequence(const cc::SurfaceId& id, |
154 const cc::SurfaceSequence& sequence); | 157 const cc::SurfaceSequence& sequence); |
155 | 158 |
156 void SetRect(const gfx::Rect& frame_rect); | 159 void SetRect(const gfx::Rect& frame_rect); |
157 | 160 |
158 // The RenderFrameProxyHost that routes messages to the parent frame's | 161 // The RenderFrameProxyHost that routes messages to the parent frame's |
159 // renderer process. | 162 // renderer process. |
160 RenderFrameProxyHost* frame_proxy_in_parent_renderer_; | 163 RenderFrameProxyHost* frame_proxy_in_parent_renderer_; |
161 | 164 |
162 // The RenderWidgetHostView for the frame. Initially NULL. | 165 // The RenderWidgetHostView for the frame. Initially NULL. |
163 RenderWidgetHostViewChildFrame* view_; | 166 RenderWidgetHostViewChildFrame* view_; |
164 | 167 |
165 gfx::Rect child_frame_rect_; | 168 gfx::Rect child_frame_rect_; |
166 gfx::Rect viewport_intersection_rect_; | 169 gfx::Rect viewport_intersection_rect_; |
| 170 bool is_inert_ = false; |
167 | 171 |
168 bool is_scroll_bubbling_; | 172 bool is_scroll_bubbling_; |
169 }; | 173 }; |
170 | 174 |
171 } // namespace content | 175 } // namespace content |
172 | 176 |
173 #endif // CONTENT_BROWSER_FRAME_HOST_CROSS_PROCESS_FRAME_CONNECTOR_H_ | 177 #endif // CONTENT_BROWSER_FRAME_HOST_CROSS_PROCESS_FRAME_CONNECTOR_H_ |
174 | 178 |
OLD | NEW |