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

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

Issue 1839643009: RELEASE_ASSERT -> CHECK and ASSERT -> DCHECK in web. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Return DCHECK_IS_ON checks. Created 4 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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 72
73 if (!m_haveEnteredFullscreen) { 73 if (!m_haveEnteredFullscreen) {
74 updatePageScaleConstraints(false); 74 updatePageScaleConstraints(false);
75 m_webViewImpl->setPageScaleFactor(1.0f); 75 m_webViewImpl->setPageScaleFactor(1.0f);
76 m_webViewImpl->mainFrame()->setScrollOffset(WebSize()); 76 m_webViewImpl->mainFrame()->setScrollOffset(WebSize());
77 m_webViewImpl->setVisualViewportOffset(FloatPoint()); 77 m_webViewImpl->setVisualViewportOffset(FloatPoint());
78 m_haveEnteredFullscreen = true; 78 m_haveEnteredFullscreen = true;
79 } 79 }
80 80
81 Fullscreen::from(document).didEnterFullScreenForElement(element.get()); 81 Fullscreen::from(document).didEnterFullScreenForElement(element.get());
82 ASSERT(Fullscreen::currentFullScreenElementFrom(document) == element); 82 DCHECK_EQ(Fullscreen::currentFullScreenElementFrom(document), element);
83 83
84 if (isHTMLVideoElement(element)) { 84 if (isHTMLVideoElement(element)) {
85 HTMLVideoElement* videoElement = toHTMLVideoElement(element); 85 HTMLVideoElement* videoElement = toHTMLVideoElement(element);
86 if (videoElement->usesOverlayFullscreenVideo() && m_webViewImpl->layerTr eeView()) 86 if (videoElement->usesOverlayFullscreenVideo() && m_webViewImpl->layerTr eeView())
87 m_webViewImpl->layerTreeView()->setHasTransparentBackground(true); 87 m_webViewImpl->layerTreeView()->setHasTransparentBackground(true);
88 } 88 }
89 } 89 }
90 90
91 void FullscreenController::didExitFullScreen() 91 void FullscreenController::didExitFullScreen()
92 { 92 {
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 // We need to transition to fullscreen mode. 150 // We need to transition to fullscreen mode.
151 WebLocalFrameImpl* frame = WebLocalFrameImpl::fromFrame(element->document(). frame()); 151 WebLocalFrameImpl* frame = WebLocalFrameImpl::fromFrame(element->document(). frame());
152 if (frame && frame->client()) { 152 if (frame && frame->client()) {
153 frame->client()->enterFullscreen(); 153 frame->client()->enterFullscreen();
154 m_provisionalFullScreenElement = element; 154 m_provisionalFullScreenElement = element;
155 } 155 }
156 } 156 }
157 157
158 void FullscreenController::exitFullScreenForElement(Element* element) 158 void FullscreenController::exitFullScreenForElement(Element* element)
159 { 159 {
160 ASSERT(element); 160 DCHECK(element);
161 161
162 // The client is exiting full screen, so don't send a notification. 162 // The client is exiting full screen, so don't send a notification.
163 if (m_isCancelingFullScreen) 163 if (m_isCancelingFullScreen)
164 return; 164 return;
165 165
166 WebLocalFrameImpl* frame = WebLocalFrameImpl::fromFrame(element->document(). frame()); 166 WebLocalFrameImpl* frame = WebLocalFrameImpl::fromFrame(element->document(). frame());
167 if (frame && frame->client()) 167 if (frame && frame->client())
168 frame->client()->exitFullscreen(); 168 frame->client()->exitFullscreen();
169 } 169 }
170 170
(...skipping 22 matching lines...) Expand all
193 } 193 }
194 194
195 DEFINE_TRACE(FullscreenController) 195 DEFINE_TRACE(FullscreenController)
196 { 196 {
197 visitor->trace(m_provisionalFullScreenElement); 197 visitor->trace(m_provisionalFullScreenElement);
198 visitor->trace(m_fullScreenFrame); 198 visitor->trace(m_fullScreenFrame);
199 } 199 }
200 200
201 } // namespace blink 201 } // namespace blink
202 202
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp ('k') | third_party/WebKit/Source/web/InspectorOverlay.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698