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

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

Issue 2122023002: Cross-process frames should be notified of device scale factor changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Version of patch without second test. 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 #include "content/browser/frame_host/render_widget_host_view_child_frame.h" 5 #include "content/browser/frame_host/render_widget_host_view_child_frame.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 424
425 void RenderWidgetHostViewChildFrame::ProcessFrameSwappedCallbacks() { 425 void RenderWidgetHostViewChildFrame::ProcessFrameSwappedCallbacks() {
426 // We only use callbacks once, therefore we make a new list for registration 426 // We only use callbacks once, therefore we make a new list for registration
427 // before we start, and discard the old list entries when we are done. 427 // before we start, and discard the old list entries when we are done.
428 FrameSwappedCallbackList process_callbacks; 428 FrameSwappedCallbackList process_callbacks;
429 process_callbacks.swap(frame_swapped_callbacks_); 429 process_callbacks.swap(frame_swapped_callbacks_);
430 for (std::unique_ptr<base::Closure>& callback : process_callbacks) 430 for (std::unique_ptr<base::Closure>& callback : process_callbacks)
431 callback->Run(); 431 callback->Run();
432 } 432 }
433 433
434 void RenderWidgetHostViewChildFrame::GetScreenInfo(
435 blink::WebScreenInfo* results) {
436 if (!frame_connector_)
437 return;
438 frame_connector_->GetScreenInfo(results);
439 }
440
441 gfx::Rect RenderWidgetHostViewChildFrame::GetBoundsInRootWindow() { 434 gfx::Rect RenderWidgetHostViewChildFrame::GetBoundsInRootWindow() {
442 gfx::Rect rect; 435 gfx::Rect rect;
443 if (frame_connector_) { 436 if (frame_connector_) {
444 RenderWidgetHostViewBase* root_view = 437 RenderWidgetHostViewBase* root_view =
445 frame_connector_->GetRootRenderWidgetHostView(); 438 frame_connector_->GetRootRenderWidgetHostView();
446 439
447 // The root_view can be null in tests when using a TestWebContents. 440 // The root_view can be null in tests when using a TestWebContents.
448 if (root_view) 441 if (root_view)
449 rect = root_view->GetBoundsInRootWindow(); 442 rect = root_view->GetBoundsInRootWindow();
450 } 443 }
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
726 719
727 bool RenderWidgetHostViewChildFrame::IsChildFrameForTesting() const { 720 bool RenderWidgetHostViewChildFrame::IsChildFrameForTesting() const {
728 return true; 721 return true;
729 } 722 }
730 723
731 cc::SurfaceId RenderWidgetHostViewChildFrame::SurfaceIdForTesting() const { 724 cc::SurfaceId RenderWidgetHostViewChildFrame::SurfaceIdForTesting() const {
732 return surface_id_; 725 return surface_id_;
733 }; 726 };
734 727
735 } // namespace content 728 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698