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

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

Issue 646403002: NOT FOR REVIEW: Alternative for supporting fullscreen for non-media in the WebView. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « no previous file | public/web/WebWidgetClient.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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 137
138 // We are already in fullscreen mode. 138 // We are already in fullscreen mode.
139 if (m_fullScreenFrame) { 139 if (m_fullScreenFrame) {
140 m_provisionalFullScreenElement = element; 140 m_provisionalFullScreenElement = element;
141 didEnterFullScreen(); 141 didEnterFullScreen();
142 return; 142 return;
143 } 143 }
144 144
145 // We need to transition to fullscreen mode. 145 // We need to transition to fullscreen mode.
146 if (WebViewClient* client = m_webViewImpl->client()) { 146 if (WebViewClient* client = m_webViewImpl->client()) {
147 if (client->enterFullScreen()) 147 if (client->enterFullScreen(isHTMLVideoElement(element)))
148 m_provisionalFullScreenElement = element; 148 m_provisionalFullScreenElement = element;
149 } 149 }
150 } 150 }
151 151
152 void FullscreenController::exitFullScreenForElement(Element* element) 152 void FullscreenController::exitFullScreenForElement(Element* element)
153 { 153 {
154 // The client is exiting full screen, so don't send a notification. 154 // The client is exiting full screen, so don't send a notification.
155 if (m_isCancelingFullScreen) 155 if (m_isCancelingFullScreen)
156 return; 156 return;
157 if (WebViewClient* client = m_webViewImpl->client()) 157 if (WebViewClient* client = m_webViewImpl->client())
158 client->exitFullScreen(); 158 client->exitFullScreen(isHTMLVideoElement(element));
159 } 159 }
160 160
161 void FullscreenController::trace(Visitor* visitor) 161 void FullscreenController::trace(Visitor* visitor)
162 { 162 {
163 visitor->trace(m_provisionalFullScreenElement); 163 visitor->trace(m_provisionalFullScreenElement);
164 visitor->trace(m_fullScreenFrame); 164 visitor->trace(m_fullScreenFrame);
165 } 165 }
166 166
167 } // namespace blink 167 } // namespace blink
168 168
OLDNEW
« no previous file with comments | « no previous file | public/web/WebWidgetClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698