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

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

Issue 2910023002: Ensure RemoteViewportIntersection rect persists across frame navigations (Closed)
Patch Set: dcheng comments addressed 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 #include "content/browser/frame_host/cross_process_frame_connector.h" 5 #include "content/browser/frame_host/cross_process_frame_connector.h"
6 6
7 #include "cc/surfaces/surface.h" 7 #include "cc/surfaces/surface.h"
8 #include "cc/surfaces/surface_hittest.h" 8 #include "cc/surfaces/surface_hittest.h"
9 #include "cc/surfaces/surface_manager.h" 9 #include "cc/surfaces/surface_manager.h"
10 #include "content/browser/compositor/surface_utils.h" 10 #include "content/browser/compositor/surface_utils.h"
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 } 239 }
240 240
241 void CrossProcessFrameConnector::OnFrameRectChanged( 241 void CrossProcessFrameConnector::OnFrameRectChanged(
242 const gfx::Rect& frame_rect) { 242 const gfx::Rect& frame_rect) {
243 if (!frame_rect.size().IsEmpty()) 243 if (!frame_rect.size().IsEmpty())
244 SetRect(frame_rect); 244 SetRect(frame_rect);
245 } 245 }
246 246
247 void CrossProcessFrameConnector::OnUpdateViewportIntersection( 247 void CrossProcessFrameConnector::OnUpdateViewportIntersection(
248 const gfx::Rect& viewport_intersection) { 248 const gfx::Rect& viewport_intersection) {
249 viewport_intersection_rect_ = viewport_intersection;
249 if (view_) 250 if (view_)
250 view_->UpdateViewportIntersection(viewport_intersection); 251 view_->UpdateViewportIntersection(viewport_intersection);
251 } 252 }
252 253
253 void CrossProcessFrameConnector::OnVisibilityChanged(bool visible) { 254 void CrossProcessFrameConnector::OnVisibilityChanged(bool visible) {
254 if (!view_) 255 if (!view_)
255 return; 256 return;
256 257
257 // If there is an inner WebContents, it should be notified of the change in 258 // If there is an inner WebContents, it should be notified of the change in
258 // the visibility. The Show/Hide methods will not be called if an inner 259 // the visibility. The Show/Hide methods will not be called if an inner
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 336
336 if (parent) { 337 if (parent) {
337 return static_cast<RenderWidgetHostViewBase*>( 338 return static_cast<RenderWidgetHostViewBase*>(
338 parent->current_frame_host()->GetView()); 339 parent->current_frame_host()->GetView());
339 } 340 }
340 341
341 return nullptr; 342 return nullptr;
342 } 343 }
343 344
344 } // namespace content 345 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698