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

Unified Diff: content/browser/renderer_host/render_widget_host_view_mac.mm

Issue 388803003: [Mac] Replace SetOverlayView with AllowOtherViews. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased, fixed comments Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/render_widget_host_view_mac.mm
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
index a4395d10be18a32e5ceea1b163596c453e90252e..8214d896803d606d0622b4dc1c0598f177df9d54 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -488,9 +488,9 @@ RenderWidgetHostViewMac::RenderWidgetHostViewMac(RenderWidgetHost* widget)
new BrowserCompositorViewPlaceholderMac),
backing_store_scale_factor_(1),
is_loading_(false),
+ allow_pause_for_resize_or_repaint_(true),
weak_factory_(this),
fullscreen_parent_host_view_(NULL),
- overlay_view_weak_factory_(this),
software_frame_weak_ptr_factory_(this) {
software_frame_manager_.reset(new SoftwareFrameManager(
software_frame_weak_ptr_factory_.GetWeakPtr()));
@@ -543,6 +543,10 @@ void RenderWidgetHostViewMac::SetAllowOverlappingViews(bool overlapping) {
// TODO(ccameron): Remove callers of this function.
}
+void RenderWidgetHostViewMac::SetAllowPauseForResizeOrRepaint(bool allow) {
+ allow_pause_for_resize_or_repaint_ = allow;
+}
+
///////////////////////////////////////////////////////////////////////////////
// RenderWidgetHostViewMac, RenderWidgetHostView implementation:
@@ -1566,22 +1570,6 @@ void RenderWidgetHostViewMac::DestroyCompositingStateOnError() {
// repeatedly.
}
-void RenderWidgetHostViewMac::SetOverlayView(
- RenderWidgetHostViewMac* overlay, const gfx::Point& offset) {
- if (overlay_view_)
- overlay_view_->underlay_view_.reset();
-
- overlay_view_ = overlay->overlay_view_weak_factory_.GetWeakPtr();
- overlay_view_->underlay_view_ = overlay_view_weak_factory_.GetWeakPtr();
-}
-
-void RenderWidgetHostViewMac::RemoveOverlayView() {
- if (overlay_view_) {
- overlay_view_->underlay_view_.reset();
- overlay_view_.reset();
- }
-}
-
bool RenderWidgetHostViewMac::GetLineBreakIndex(
const std::vector<gfx::Rect>& bounds,
const gfx::Range& range,
@@ -2194,10 +2182,9 @@ void RenderWidgetHostViewMac::PauseForPendingResizeOrRepaintsAndDraw() {
if (delegated_frame_host_)
return;
- // Pausing for the overlay/underlay view prevents the other one from receiving
- // frames. This may lead to large delays, causing overlaps.
- // See crbug.com/352020.
- if (underlay_view_ || overlay_view_)
+ // Pausing for one view prevents others from receiving frames.
+ // This may lead to large delays, causing overlaps. See crbug.com/352020.
+ if (!allow_pause_for_resize_or_repaint_)
return;
// Ensure that all frames are acked before waiting for a frame to come in.
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_mac.h ('k') | content/browser/web_contents/web_contents_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698