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

Side by Side Diff: third_party/WebKit/Source/web/WebPagePopupImpl.cpp

Issue 2791223002: Notify Blink to suppress frame requests during BeginMainFrame (Closed)
Patch Set: DCHECK update Created 3 years, 8 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 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 if (m_layerTreeView) { 388 if (m_layerTreeView) {
389 m_layerTreeView->setVisible(true); 389 m_layerTreeView->setVisible(true);
390 m_animationHost = WTF::makeUnique<CompositorAnimationHost>( 390 m_animationHost = WTF::makeUnique<CompositorAnimationHost>(
391 m_layerTreeView->compositorAnimationHost()); 391 m_layerTreeView->compositorAnimationHost());
392 m_page->layerTreeViewInitialized(*m_layerTreeView, nullptr); 392 m_page->layerTreeViewInitialized(*m_layerTreeView, nullptr);
393 } else { 393 } else {
394 m_animationHost = nullptr; 394 m_animationHost = nullptr;
395 } 395 }
396 } 396 }
397 397
398 void WebPagePopupImpl::setSuppressFrameRequestsWorkaroundFor704763Only(
399 bool suppressFrameRequests) {
400 if (!m_page)
401 return;
402 m_page->animator().setSuppressFrameRequestsWorkaroundFor704763Only(
403 suppressFrameRequests);
404 }
398 void WebPagePopupImpl::beginFrame(double lastFrameTimeMonotonic) { 405 void WebPagePopupImpl::beginFrame(double lastFrameTimeMonotonic) {
399 if (!m_page) 406 if (!m_page)
400 return; 407 return;
401 // FIXME: This should use lastFrameTimeMonotonic but doing so 408 // FIXME: This should use lastFrameTimeMonotonic but doing so
402 // breaks tests. 409 // breaks tests.
403 PageWidgetDelegate::animate(*m_page, monotonicallyIncreasingTime()); 410 PageWidgetDelegate::animate(*m_page, monotonicallyIncreasingTime());
404 } 411 }
405 412
406 void WebPagePopupImpl::willCloseLayerTreeView() { 413 void WebPagePopupImpl::willCloseLayerTreeView() {
407 if (m_page && m_layerTreeView) 414 if (m_page && m_layerTreeView)
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
590 // A WebPagePopupImpl instance usually has two references. 597 // A WebPagePopupImpl instance usually has two references.
591 // - One owned by the instance itself. It represents the visible widget. 598 // - One owned by the instance itself. It represents the visible widget.
592 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the 599 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the
593 // WebPagePopupImpl to close. 600 // WebPagePopupImpl to close.
594 // We need them because the closing operation is asynchronous and the widget 601 // We need them because the closing operation is asynchronous and the widget
595 // can be closed while the WebViewImpl is unaware of it. 602 // can be closed while the WebViewImpl is unaware of it.
596 return adoptRef(new WebPagePopupImpl(client)).leakRef(); 603 return adoptRef(new WebPagePopupImpl(client)).leakRef();
597 } 604 }
598 605
599 } // namespace blink 606 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698