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

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

Issue 422923002: Revert of Remove WebSettings::setDisallowFullscreenForNonMediaElements(bool) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/web/WebSettingsImpl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 fullscreen->didExitFullScreenForElement(0); 148 fullscreen->didExitFullScreenForElement(0);
149 } 149 }
150 } 150 }
151 } 151 }
152 152
153 m_fullScreenFrame.clear(); 153 m_fullScreenFrame.clear();
154 } 154 }
155 155
156 void FullscreenController::enterFullScreenForElement(blink::Element* element) 156 void FullscreenController::enterFullScreenForElement(blink::Element* element)
157 { 157 {
158 if (m_webViewImpl->settingsImpl()->disallowFullscreenForNonMediaElements() & & !isHTMLMediaElement(element))
159 return;
160
158 // We are already transitioning to fullscreen for a different element. 161 // We are already transitioning to fullscreen for a different element.
159 if (m_provisionalFullScreenElement) { 162 if (m_provisionalFullScreenElement) {
160 m_provisionalFullScreenElement = element; 163 m_provisionalFullScreenElement = element;
161 return; 164 return;
162 } 165 }
163 166
164 // We are already in fullscreen mode. 167 // We are already in fullscreen mode.
165 if (m_fullScreenFrame) { 168 if (m_fullScreenFrame) {
166 m_provisionalFullScreenElement = element; 169 m_provisionalFullScreenElement = element;
167 willEnterFullScreen(); 170 willEnterFullScreen();
(...skipping 12 matching lines...) Expand all
180 { 183 {
181 // The client is exiting full screen, so don't send a notification. 184 // The client is exiting full screen, so don't send a notification.
182 if (m_isCancelingFullScreen) 185 if (m_isCancelingFullScreen)
183 return; 186 return;
184 if (WebViewClient* client = m_webViewImpl->client()) 187 if (WebViewClient* client = m_webViewImpl->client())
185 client->exitFullScreen(); 188 client->exitFullScreen();
186 } 189 }
187 190
188 } 191 }
189 192
OLDNEW
« no previous file with comments | « no previous file | Source/web/WebSettingsImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698