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

Unified Diff: Source/web/FullscreenController.cpp

Issue 171333003: Pass implementation object to supplemental classes by reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 10 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: Source/web/FullscreenController.cpp
diff --git a/Source/web/FullscreenController.cpp b/Source/web/FullscreenController.cpp
index 651ef36a0d84fe0ee80d8135d8952d22c80eb880..7eb59d6af50926934f0b80858aacbeea914a86d5 100644
--- a/Source/web/FullscreenController.cpp
+++ b/Source/web/FullscreenController.cpp
@@ -65,7 +65,7 @@ void FullscreenController::willEnterFullScreen()
// Ensure that this element's document is still attached.
Document& doc = m_provisionalFullScreenElement->document();
if (doc.frame()) {
- FullscreenElementStack::from(&doc)->webkitWillEnterFullScreenForElement(m_provisionalFullScreenElement.get());
+ FullscreenElementStack::from(doc).webkitWillEnterFullScreenForElement(m_provisionalFullScreenElement.get());
m_fullScreenFrame = doc.frame();
}
m_provisionalFullScreenElement.clear();
@@ -77,16 +77,16 @@ void FullscreenController::didEnterFullScreen()
return;
if (Document* doc = m_fullScreenFrame->document()) {
- if (FullscreenElementStack::isFullScreen(doc)) {
+ if (FullscreenElementStack::isFullScreen(*doc)) {
if (!m_exitFullscreenPageScaleFactor) {
m_exitFullscreenPageScaleFactor = m_webViewImpl->pageScaleFactor();
m_exitFullscreenScrollOffset = m_webViewImpl->mainFrame()->scrollOffset();
m_webViewImpl->setPageScaleFactorPreservingScrollOffset(1.0f);
}
- FullscreenElementStack::from(doc)->webkitDidEnterFullScreenForElement(0);
+ FullscreenElementStack::from(*doc).webkitDidEnterFullScreenForElement(0);
if (RuntimeEnabledFeatures::overlayFullscreenVideoEnabled()) {
- Element* element = FullscreenElementStack::currentFullScreenElementFrom(doc);
+ Element* element = FullscreenElementStack::currentFullScreenElementFrom(*doc);
ASSERT(element);
if (element->isMediaElement() && m_webViewImpl->layerTreeView())
m_webViewImpl->layerTreeView()->setHasTransparentBackground(true);
@@ -101,10 +101,10 @@ void FullscreenController::willExitFullScreen()
return;
if (Document* doc = m_fullScreenFrame->document()) {
- FullscreenElementStack* fullscreen = FullscreenElementStack::fromIfExists(doc);
+ FullscreenElementStack* fullscreen = FullscreenElementStack::fromIfExists(*doc);
if (!fullscreen)
return;
- if (fullscreen->isFullScreen(doc)) {
+ if (fullscreen->isFullScreen(*doc)) {
// When the client exits from full screen we have to call webkitCancelFullScreen to
// notify the document. While doing that, suppress notifications back to the client.
m_isCancelingFullScreen = true;
@@ -123,7 +123,7 @@ void FullscreenController::didExitFullScreen()
return;
if (Document* doc = m_fullScreenFrame->document()) {
- if (FullscreenElementStack* fullscreen = FullscreenElementStack::fromIfExists(doc)) {
+ if (FullscreenElementStack* fullscreen = FullscreenElementStack::fromIfExists(*doc)) {
if (fullscreen->webkitIsFullScreen()) {
if (m_exitFullscreenPageScaleFactor) {
m_webViewImpl->setPageScaleFactor(m_exitFullscreenPageScaleFactor,

Powered by Google App Engine
This is Rietveld 408576698