OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. |
3 * Copyright (C) 2011 Apple Inc. All rights reserved. | 3 * Copyright (C) 2011 Apple Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 #include "public/platform/WebApplicationCacheHost.h" | 77 #include "public/platform/WebApplicationCacheHost.h" |
78 #include "public/platform/WebMediaPlayerSource.h" | 78 #include "public/platform/WebMediaPlayerSource.h" |
79 #include "public/platform/WebRTCPeerConnectionHandler.h" | 79 #include "public/platform/WebRTCPeerConnectionHandler.h" |
80 #include "public/platform/WebSecurityOrigin.h" | 80 #include "public/platform/WebSecurityOrigin.h" |
81 #include "public/platform/WebURL.h" | 81 #include "public/platform/WebURL.h" |
82 #include "public/platform/WebURLError.h" | 82 #include "public/platform/WebURLError.h" |
83 #include "public/platform/WebVector.h" | 83 #include "public/platform/WebVector.h" |
84 #include "public/platform/modules/serviceworker/WebServiceWorkerProvider.h" | 84 #include "public/platform/modules/serviceworker/WebServiceWorkerProvider.h" |
85 #include "public/platform/modules/serviceworker/WebServiceWorkerProviderClient.h
" | 85 #include "public/platform/modules/serviceworker/WebServiceWorkerProviderClient.h
" |
86 #include "public/web/WebAutofillClient.h" | 86 #include "public/web/WebAutofillClient.h" |
87 #include "public/web/WebContentSettingsClient.h" | |
88 #include "public/web/WebDOMEvent.h" | 87 #include "public/web/WebDOMEvent.h" |
89 #include "public/web/WebDocument.h" | 88 #include "public/web/WebDocument.h" |
90 #include "public/web/WebFormElement.h" | 89 #include "public/web/WebFormElement.h" |
91 #include "public/web/WebFrameClient.h" | 90 #include "public/web/WebFrameClient.h" |
92 #include "public/web/WebNode.h" | 91 #include "public/web/WebNode.h" |
93 #include "public/web/WebPlugin.h" | 92 #include "public/web/WebPlugin.h" |
94 #include "public/web/WebPluginParams.h" | 93 #include "public/web/WebPluginParams.h" |
95 #include "public/web/WebViewClient.h" | 94 #include "public/web/WebViewClient.h" |
96 #include "v8/include/v8.h" | 95 #include "v8/include/v8.h" |
97 #include "web/DevToolsEmulator.h" | 96 #include "web/DevToolsEmulator.h" |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 void LocalFrameClientImpl::didChangeScrollOffset() { | 218 void LocalFrameClientImpl::didChangeScrollOffset() { |
220 if (m_webFrame->client()) | 219 if (m_webFrame->client()) |
221 m_webFrame->client()->didChangeScrollOffset(m_webFrame); | 220 m_webFrame->client()->didChangeScrollOffset(m_webFrame); |
222 } | 221 } |
223 | 222 |
224 void LocalFrameClientImpl::didUpdateCurrentHistoryItem() { | 223 void LocalFrameClientImpl::didUpdateCurrentHistoryItem() { |
225 if (m_webFrame->client()) | 224 if (m_webFrame->client()) |
226 m_webFrame->client()->didUpdateCurrentHistoryItem(); | 225 m_webFrame->client()->didUpdateCurrentHistoryItem(); |
227 } | 226 } |
228 | 227 |
229 bool LocalFrameClientImpl::allowScript(bool enabledPerSettings) { | |
230 if (m_webFrame->contentSettingsClient()) | |
231 return m_webFrame->contentSettingsClient()->allowScript(enabledPerSettings); | |
232 | |
233 return enabledPerSettings; | |
234 } | |
235 | |
236 bool LocalFrameClientImpl::allowScriptFromSource(bool enabledPerSettings, | |
237 const KURL& scriptURL) { | |
238 if (m_webFrame->contentSettingsClient()) { | |
239 return m_webFrame->contentSettingsClient()->allowScriptFromSource( | |
240 enabledPerSettings, scriptURL); | |
241 } | |
242 | |
243 return enabledPerSettings; | |
244 } | |
245 | |
246 bool LocalFrameClientImpl::allowPlugins(bool enabledPerSettings) { | |
247 if (m_webFrame->contentSettingsClient()) { | |
248 return m_webFrame->contentSettingsClient()->allowPlugins( | |
249 enabledPerSettings); | |
250 } | |
251 | |
252 return enabledPerSettings; | |
253 } | |
254 | |
255 bool LocalFrameClientImpl::allowImage(bool enabledPerSettings, | |
256 const KURL& imageURL) { | |
257 if (m_webFrame->contentSettingsClient()) { | |
258 return m_webFrame->contentSettingsClient()->allowImage(enabledPerSettings, | |
259 imageURL); | |
260 } | |
261 | |
262 return enabledPerSettings; | |
263 } | |
264 | |
265 bool LocalFrameClientImpl::allowRunningInsecureContent(bool enabledPerSettings, | |
266 SecurityOrigin* context, | |
267 const KURL& url) { | |
268 if (m_webFrame->contentSettingsClient()) { | |
269 return m_webFrame->contentSettingsClient()->allowRunningInsecureContent( | |
270 enabledPerSettings, WebSecurityOrigin(context), WebURL(url)); | |
271 } | |
272 | |
273 return enabledPerSettings; | |
274 } | |
275 | |
276 bool LocalFrameClientImpl::allowAutoplay(bool defaultValue) { | |
277 if (m_webFrame->contentSettingsClient()) | |
278 return m_webFrame->contentSettingsClient()->allowAutoplay(defaultValue); | |
279 | |
280 return defaultValue; | |
281 } | |
282 | |
283 void LocalFrameClientImpl::passiveInsecureContentFound(const KURL& url) { | |
284 if (m_webFrame->contentSettingsClient()) { | |
285 return m_webFrame->contentSettingsClient()->passiveInsecureContentFound( | |
286 WebURL(url)); | |
287 } | |
288 } | |
289 | |
290 void LocalFrameClientImpl::didNotAllowScript() { | |
291 if (m_webFrame->contentSettingsClient()) | |
292 m_webFrame->contentSettingsClient()->didNotAllowScript(); | |
293 } | |
294 | |
295 void LocalFrameClientImpl::didNotAllowPlugins() { | |
296 if (m_webFrame->contentSettingsClient()) | |
297 m_webFrame->contentSettingsClient()->didNotAllowPlugins(); | |
298 } | |
299 | |
300 bool LocalFrameClientImpl::hasWebView() const { | 228 bool LocalFrameClientImpl::hasWebView() const { |
301 return m_webFrame->viewImpl(); | 229 return m_webFrame->viewImpl(); |
302 } | 230 } |
303 | 231 |
304 bool LocalFrameClientImpl::inShadowTree() const { | 232 bool LocalFrameClientImpl::inShadowTree() const { |
305 return m_webFrame->inShadowTree(); | 233 return m_webFrame->inShadowTree(); |
306 } | 234 } |
307 | 235 |
308 Frame* LocalFrameClientImpl::opener() const { | 236 Frame* LocalFrameClientImpl::opener() const { |
309 return toCoreFrame(m_webFrame->opener()); | 237 return toCoreFrame(m_webFrame->opener()); |
(...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
959 m_webFrame->client()->willInsertBody(m_webFrame); | 887 m_webFrame->client()->willInsertBody(m_webFrame); |
960 } | 888 } |
961 | 889 |
962 std::unique_ptr<WebServiceWorkerProvider> | 890 std::unique_ptr<WebServiceWorkerProvider> |
963 LocalFrameClientImpl::createServiceWorkerProvider() { | 891 LocalFrameClientImpl::createServiceWorkerProvider() { |
964 if (!m_webFrame->client()) | 892 if (!m_webFrame->client()) |
965 return nullptr; | 893 return nullptr; |
966 return WTF::wrapUnique(m_webFrame->client()->createServiceWorkerProvider()); | 894 return WTF::wrapUnique(m_webFrame->client()->createServiceWorkerProvider()); |
967 } | 895 } |
968 | 896 |
| 897 ContentSettingsClient* LocalFrameClientImpl::contentSettingsClient() { |
| 898 return m_webFrame->contentSettingsClient(); |
| 899 } |
| 900 |
969 SharedWorkerRepositoryClient* | 901 SharedWorkerRepositoryClient* |
970 LocalFrameClientImpl::sharedWorkerRepositoryClient() { | 902 LocalFrameClientImpl::sharedWorkerRepositoryClient() { |
971 return m_webFrame->sharedWorkerRepositoryClient(); | 903 return m_webFrame->sharedWorkerRepositoryClient(); |
972 } | 904 } |
973 | 905 |
974 std::unique_ptr<WebApplicationCacheHost> | 906 std::unique_ptr<WebApplicationCacheHost> |
975 LocalFrameClientImpl::createApplicationCacheHost( | 907 LocalFrameClientImpl::createApplicationCacheHost( |
976 WebApplicationCacheHostClient* client) { | 908 WebApplicationCacheHostClient* client) { |
977 if (!m_webFrame->client()) | 909 if (!m_webFrame->client()) |
978 return nullptr; | 910 return nullptr; |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1033 if (m_webFrame->client()) | 965 if (m_webFrame->client()) |
1034 m_webFrame->client()->setHasReceivedUserGesture(); | 966 m_webFrame->client()->setHasReceivedUserGesture(); |
1035 } | 967 } |
1036 | 968 |
1037 void LocalFrameClientImpl::abortClientNavigation() { | 969 void LocalFrameClientImpl::abortClientNavigation() { |
1038 if (m_webFrame->client()) | 970 if (m_webFrame->client()) |
1039 m_webFrame->client()->abortClientNavigation(); | 971 m_webFrame->client()->abortClientNavigation(); |
1040 } | 972 } |
1041 | 973 |
1042 } // namespace blink | 974 } // namespace blink |
OLD | NEW |