Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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) { | |
|
esprehn
2017/04/04 06:13:55
I think you need to null check the page just like
alancutter (OOO until 2018)
2017/04/04 09:54:31
Ty, done.
| |
| 400 m_page->animator().setSuppressFrameRequestsWorkaroundFor704763Only( | |
| 401 suppressFrameRequests); | |
| 402 } | |
| 398 void WebPagePopupImpl::beginFrame(double lastFrameTimeMonotonic) { | 403 void WebPagePopupImpl::beginFrame(double lastFrameTimeMonotonic) { |
| 399 if (!m_page) | 404 if (!m_page) |
| 400 return; | 405 return; |
| 401 // FIXME: This should use lastFrameTimeMonotonic but doing so | 406 // FIXME: This should use lastFrameTimeMonotonic but doing so |
| 402 // breaks tests. | 407 // breaks tests. |
| 403 PageWidgetDelegate::animate(*m_page, monotonicallyIncreasingTime()); | 408 PageWidgetDelegate::animate(*m_page, monotonicallyIncreasingTime()); |
| 404 } | 409 } |
| 405 | 410 |
| 406 void WebPagePopupImpl::willCloseLayerTreeView() { | 411 void WebPagePopupImpl::willCloseLayerTreeView() { |
| 407 if (m_page && m_layerTreeView) | 412 if (m_page && m_layerTreeView) |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 590 // A WebPagePopupImpl instance usually has two references. | 595 // A WebPagePopupImpl instance usually has two references. |
| 591 // - One owned by the instance itself. It represents the visible widget. | 596 // - 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 | 597 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the |
| 593 // WebPagePopupImpl to close. | 598 // WebPagePopupImpl to close. |
| 594 // We need them because the closing operation is asynchronous and the widget | 599 // We need them because the closing operation is asynchronous and the widget |
| 595 // can be closed while the WebViewImpl is unaware of it. | 600 // can be closed while the WebViewImpl is unaware of it. |
| 596 return adoptRef(new WebPagePopupImpl(client)).leakRef(); | 601 return adoptRef(new WebPagePopupImpl(client)).leakRef(); |
| 597 } | 602 } |
| 598 | 603 |
| 599 } // namespace blink | 604 } // namespace blink |
| OLD | NEW |