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

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

Issue 398673003: Rename WebCore namespace to blink in bindings and web (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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 | « Source/web/FullscreenController.h ('k') | Source/web/GeolocationClientProxy.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 24 matching lines...) Expand all
35 #include "core/dom/FullscreenElementStack.h" 35 #include "core/dom/FullscreenElementStack.h"
36 #include "core/frame/LocalFrame.h" 36 #include "core/frame/LocalFrame.h"
37 #include "core/html/HTMLMediaElement.h" 37 #include "core/html/HTMLMediaElement.h"
38 #include "platform/LayoutTestSupport.h" 38 #include "platform/LayoutTestSupport.h"
39 #include "platform/RuntimeEnabledFeatures.h" 39 #include "platform/RuntimeEnabledFeatures.h"
40 #include "public/web/WebFrame.h" 40 #include "public/web/WebFrame.h"
41 #include "public/web/WebViewClient.h" 41 #include "public/web/WebViewClient.h"
42 #include "web/WebSettingsImpl.h" 42 #include "web/WebSettingsImpl.h"
43 #include "web/WebViewImpl.h" 43 #include "web/WebViewImpl.h"
44 44
45 using namespace WebCore; 45 using namespace blink;
46 46
47 namespace blink { 47 namespace blink {
48 48
49 PassOwnPtr<FullscreenController> FullscreenController::create(WebViewImpl* webVi ewImpl) 49 PassOwnPtr<FullscreenController> FullscreenController::create(WebViewImpl* webVi ewImpl)
50 { 50 {
51 return adoptPtr(new FullscreenController(webViewImpl)); 51 return adoptPtr(new FullscreenController(webViewImpl));
52 } 52 }
53 53
54 FullscreenController::FullscreenController(WebViewImpl* webViewImpl) 54 FullscreenController::FullscreenController(WebViewImpl* webViewImpl)
55 : m_webViewImpl(webViewImpl) 55 : m_webViewImpl(webViewImpl)
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 } 146 }
147 147
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(WebCore::Element* element) 156 void FullscreenController::enterFullScreenForElement(blink::Element* element)
157 { 157 {
158 if (m_webViewImpl->settingsImpl()->disallowFullscreenForNonMediaElements() & & !isHTMLMediaElement(element)) 158 if (m_webViewImpl->settingsImpl()->disallowFullscreenForNonMediaElements() & & !isHTMLMediaElement(element))
159 return; 159 return;
160 160
161 // We are already transitioning to fullscreen for a different element. 161 // We are already transitioning to fullscreen for a different element.
162 if (m_provisionalFullScreenElement) { 162 if (m_provisionalFullScreenElement) {
163 m_provisionalFullScreenElement = element; 163 m_provisionalFullScreenElement = element;
164 return; 164 return;
165 } 165 }
166 166
167 // We are already in fullscreen mode. 167 // We are already in fullscreen mode.
168 if (m_fullScreenFrame) { 168 if (m_fullScreenFrame) {
169 m_provisionalFullScreenElement = element; 169 m_provisionalFullScreenElement = element;
170 willEnterFullScreen(); 170 willEnterFullScreen();
171 didEnterFullScreen(); 171 didEnterFullScreen();
172 return; 172 return;
173 } 173 }
174 174
175 // We need to transition to fullscreen mode. 175 // We need to transition to fullscreen mode.
176 if (WebViewClient* client = m_webViewImpl->client()) { 176 if (WebViewClient* client = m_webViewImpl->client()) {
177 if (client->enterFullScreen()) 177 if (client->enterFullScreen())
178 m_provisionalFullScreenElement = element; 178 m_provisionalFullScreenElement = element;
179 } 179 }
180 } 180 }
181 181
182 void FullscreenController::exitFullScreenForElement(WebCore::Element* element) 182 void FullscreenController::exitFullScreenForElement(blink::Element* element)
183 { 183 {
184 // 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.
185 if (m_isCancelingFullScreen) 185 if (m_isCancelingFullScreen)
186 return; 186 return;
187 if (WebViewClient* client = m_webViewImpl->client()) 187 if (WebViewClient* client = m_webViewImpl->client())
188 client->exitFullScreen(); 188 client->exitFullScreen();
189 } 189 }
190 190
191 } 191 }
192 192
OLDNEW
« no previous file with comments | « Source/web/FullscreenController.h ('k') | Source/web/GeolocationClientProxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698