| 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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 void LocalFrameClientImpl::didChangeScrollOffset() { | 217 void LocalFrameClientImpl::didChangeScrollOffset() { |
| 219 if (m_webFrame->client()) | 218 if (m_webFrame->client()) |
| 220 m_webFrame->client()->didChangeScrollOffset(m_webFrame); | 219 m_webFrame->client()->didChangeScrollOffset(m_webFrame); |
| 221 } | 220 } |
| 222 | 221 |
| 223 void LocalFrameClientImpl::didUpdateCurrentHistoryItem() { | 222 void LocalFrameClientImpl::didUpdateCurrentHistoryItem() { |
| 224 if (m_webFrame->client()) | 223 if (m_webFrame->client()) |
| 225 m_webFrame->client()->didUpdateCurrentHistoryItem(); | 224 m_webFrame->client()->didUpdateCurrentHistoryItem(); |
| 226 } | 225 } |
| 227 | 226 |
| 228 bool LocalFrameClientImpl::allowScript(bool enabledPerSettings) { | |
| 229 if (m_webFrame->contentSettingsClient()) | |
| 230 return m_webFrame->contentSettingsClient()->allowScript(enabledPerSettings); | |
| 231 | |
| 232 return enabledPerSettings; | |
| 233 } | |
| 234 | |
| 235 bool LocalFrameClientImpl::allowScriptFromSource(bool enabledPerSettings, | |
| 236 const KURL& scriptURL) { | |
| 237 if (m_webFrame->contentSettingsClient()) { | |
| 238 return m_webFrame->contentSettingsClient()->allowScriptFromSource( | |
| 239 enabledPerSettings, scriptURL); | |
| 240 } | |
| 241 | |
| 242 return enabledPerSettings; | |
| 243 } | |
| 244 | |
| 245 bool LocalFrameClientImpl::allowPlugins(bool enabledPerSettings) { | |
| 246 if (m_webFrame->contentSettingsClient()) { | |
| 247 return m_webFrame->contentSettingsClient()->allowPlugins( | |
| 248 enabledPerSettings); | |
| 249 } | |
| 250 | |
| 251 return enabledPerSettings; | |
| 252 } | |
| 253 | |
| 254 bool LocalFrameClientImpl::allowImage(bool enabledPerSettings, | |
| 255 const KURL& imageURL) { | |
| 256 if (m_webFrame->contentSettingsClient()) { | |
| 257 return m_webFrame->contentSettingsClient()->allowImage(enabledPerSettings, | |
| 258 imageURL); | |
| 259 } | |
| 260 | |
| 261 return enabledPerSettings; | |
| 262 } | |
| 263 | |
| 264 bool LocalFrameClientImpl::allowRunningInsecureContent(bool enabledPerSettings, | |
| 265 SecurityOrigin* context, | |
| 266 const KURL& url) { | |
| 267 if (m_webFrame->contentSettingsClient()) { | |
| 268 return m_webFrame->contentSettingsClient()->allowRunningInsecureContent( | |
| 269 enabledPerSettings, WebSecurityOrigin(context), WebURL(url)); | |
| 270 } | |
| 271 | |
| 272 return enabledPerSettings; | |
| 273 } | |
| 274 | |
| 275 bool LocalFrameClientImpl::allowAutoplay(bool defaultValue) { | |
| 276 if (m_webFrame->contentSettingsClient()) | |
| 277 return m_webFrame->contentSettingsClient()->allowAutoplay(defaultValue); | |
| 278 | |
| 279 return defaultValue; | |
| 280 } | |
| 281 | |
| 282 void LocalFrameClientImpl::passiveInsecureContentFound(const KURL& url) { | |
| 283 if (m_webFrame->contentSettingsClient()) { | |
| 284 return m_webFrame->contentSettingsClient()->passiveInsecureContentFound( | |
| 285 WebURL(url)); | |
| 286 } | |
| 287 } | |
| 288 | |
| 289 void LocalFrameClientImpl::didNotAllowScript() { | |
| 290 if (m_webFrame->contentSettingsClient()) | |
| 291 m_webFrame->contentSettingsClient()->didNotAllowScript(); | |
| 292 } | |
| 293 | |
| 294 void LocalFrameClientImpl::didNotAllowPlugins() { | |
| 295 if (m_webFrame->contentSettingsClient()) | |
| 296 m_webFrame->contentSettingsClient()->didNotAllowPlugins(); | |
| 297 } | |
| 298 | |
| 299 bool LocalFrameClientImpl::hasWebView() const { | 227 bool LocalFrameClientImpl::hasWebView() const { |
| 300 return m_webFrame->viewImpl(); | 228 return m_webFrame->viewImpl(); |
| 301 } | 229 } |
| 302 | 230 |
| 303 bool LocalFrameClientImpl::inShadowTree() const { | 231 bool LocalFrameClientImpl::inShadowTree() const { |
| 304 return m_webFrame->inShadowTree(); | 232 return m_webFrame->inShadowTree(); |
| 305 } | 233 } |
| 306 | 234 |
| 307 Frame* LocalFrameClientImpl::opener() const { | 235 Frame* LocalFrameClientImpl::opener() const { |
| 308 return toCoreFrame(m_webFrame->opener()); | 236 return toCoreFrame(m_webFrame->opener()); |
| (...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 956 m_webFrame->client()->willInsertBody(m_webFrame); | 884 m_webFrame->client()->willInsertBody(m_webFrame); |
| 957 } | 885 } |
| 958 | 886 |
| 959 std::unique_ptr<WebServiceWorkerProvider> | 887 std::unique_ptr<WebServiceWorkerProvider> |
| 960 LocalFrameClientImpl::createServiceWorkerProvider() { | 888 LocalFrameClientImpl::createServiceWorkerProvider() { |
| 961 if (!m_webFrame->client()) | 889 if (!m_webFrame->client()) |
| 962 return nullptr; | 890 return nullptr; |
| 963 return WTF::wrapUnique(m_webFrame->client()->createServiceWorkerProvider()); | 891 return WTF::wrapUnique(m_webFrame->client()->createServiceWorkerProvider()); |
| 964 } | 892 } |
| 965 | 893 |
| 894 ContentSettingsClient& LocalFrameClientImpl::contentSettingsClient() { |
| 895 return m_webFrame->contentSettingsClient(); |
| 896 } |
| 897 |
| 966 SharedWorkerRepositoryClient* | 898 SharedWorkerRepositoryClient* |
| 967 LocalFrameClientImpl::sharedWorkerRepositoryClient() { | 899 LocalFrameClientImpl::sharedWorkerRepositoryClient() { |
| 968 return m_webFrame->sharedWorkerRepositoryClient(); | 900 return m_webFrame->sharedWorkerRepositoryClient(); |
| 969 } | 901 } |
| 970 | 902 |
| 971 std::unique_ptr<WebApplicationCacheHost> | 903 std::unique_ptr<WebApplicationCacheHost> |
| 972 LocalFrameClientImpl::createApplicationCacheHost( | 904 LocalFrameClientImpl::createApplicationCacheHost( |
| 973 WebApplicationCacheHostClient* client) { | 905 WebApplicationCacheHostClient* client) { |
| 974 if (!m_webFrame->client()) | 906 if (!m_webFrame->client()) |
| 975 return nullptr; | 907 return nullptr; |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1034 void LocalFrameClientImpl::abortClientNavigation() { | 966 void LocalFrameClientImpl::abortClientNavigation() { |
| 1035 if (m_webFrame->client()) | 967 if (m_webFrame->client()) |
| 1036 m_webFrame->client()->abortClientNavigation(); | 968 m_webFrame->client()->abortClientNavigation(); |
| 1037 } | 969 } |
| 1038 | 970 |
| 1039 TextCheckerClient& LocalFrameClientImpl::textCheckerClient() const { | 971 TextCheckerClient& LocalFrameClientImpl::textCheckerClient() const { |
| 1040 return m_webFrame->textCheckerClient(); | 972 return m_webFrame->textCheckerClient(); |
| 1041 } | 973 } |
| 1042 | 974 |
| 1043 } // namespace blink | 975 } // namespace blink |
| OLD | NEW |