OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/renderer/chrome_content_renderer_client.h" | 5 #include "chrome/renderer/chrome_content_renderer_client.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/debug/crash_logging.h" | 8 #include "base/debug/crash_logging.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/metrics/field_trial.h" | 10 #include "base/metrics/field_trial.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 #include "chrome/renderer/external_extension.h" | 36 #include "chrome/renderer/external_extension.h" |
37 #include "chrome/renderer/loadtimes_extension_bindings.h" | 37 #include "chrome/renderer/loadtimes_extension_bindings.h" |
38 #include "chrome/renderer/media/chrome_key_systems.h" | 38 #include "chrome/renderer/media/chrome_key_systems.h" |
39 #include "chrome/renderer/net/net_error_helper.h" | 39 #include "chrome/renderer/net/net_error_helper.h" |
40 #include "chrome/renderer/net_benchmarking_extension.h" | 40 #include "chrome/renderer/net_benchmarking_extension.h" |
41 #include "chrome/renderer/page_load_histograms.h" | 41 #include "chrome/renderer/page_load_histograms.h" |
42 #include "chrome/renderer/pepper/pepper_helper.h" | 42 #include "chrome/renderer/pepper/pepper_helper.h" |
43 #include "chrome/renderer/plugins/non_loadable_plugin_placeholder.h" | 43 #include "chrome/renderer/plugins/non_loadable_plugin_placeholder.h" |
44 #include "chrome/renderer/plugins/plugin_preroller.h" | 44 #include "chrome/renderer/plugins/plugin_preroller.h" |
45 #include "chrome/renderer/plugins/plugin_uma.h" | 45 #include "chrome/renderer/plugins/plugin_uma.h" |
46 #include "chrome/renderer/plugins/shadow_dom_plugin_placeholder.h" | |
47 #include "chrome/renderer/prerender/prerender_dispatcher.h" | 46 #include "chrome/renderer/prerender/prerender_dispatcher.h" |
48 #include "chrome/renderer/prerender/prerender_helper.h" | 47 #include "chrome/renderer/prerender/prerender_helper.h" |
49 #include "chrome/renderer/prerender/prerenderer_client.h" | 48 #include "chrome/renderer/prerender/prerenderer_client.h" |
50 #include "chrome/renderer/safe_browsing/malware_dom_details.h" | 49 #include "chrome/renderer/safe_browsing/malware_dom_details.h" |
51 #include "chrome/renderer/safe_browsing/phishing_classifier_delegate.h" | 50 #include "chrome/renderer/safe_browsing/phishing_classifier_delegate.h" |
52 #include "chrome/renderer/searchbox/search_bouncer.h" | 51 #include "chrome/renderer/searchbox/search_bouncer.h" |
53 #include "chrome/renderer/searchbox/searchbox.h" | 52 #include "chrome/renderer/searchbox/searchbox.h" |
54 #include "chrome/renderer/searchbox/searchbox_extension.h" | 53 #include "chrome/renderer/searchbox/searchbox_extension.h" |
55 #include "chrome/renderer/tts_dispatcher.h" | 54 #include "chrome/renderer/tts_dispatcher.h" |
56 #include "chrome/renderer/worker_content_settings_client_proxy.h" | 55 #include "chrome/renderer/worker_content_settings_client_proxy.h" |
(...skipping 28 matching lines...) Expand all Loading... |
85 #include "third_party/WebKit/public/platform/WebURLError.h" | 84 #include "third_party/WebKit/public/platform/WebURLError.h" |
86 #include "third_party/WebKit/public/platform/WebURLRequest.h" | 85 #include "third_party/WebKit/public/platform/WebURLRequest.h" |
87 #include "third_party/WebKit/public/platform/WebURLResponse.h" | 86 #include "third_party/WebKit/public/platform/WebURLResponse.h" |
88 #include "third_party/WebKit/public/web/WebCache.h" | 87 #include "third_party/WebKit/public/web/WebCache.h" |
89 #include "third_party/WebKit/public/web/WebDataSource.h" | 88 #include "third_party/WebKit/public/web/WebDataSource.h" |
90 #include "third_party/WebKit/public/web/WebDocument.h" | 89 #include "third_party/WebKit/public/web/WebDocument.h" |
91 #include "third_party/WebKit/public/web/WebElement.h" | 90 #include "third_party/WebKit/public/web/WebElement.h" |
92 #include "third_party/WebKit/public/web/WebLocalFrame.h" | 91 #include "third_party/WebKit/public/web/WebLocalFrame.h" |
93 #include "third_party/WebKit/public/web/WebPluginContainer.h" | 92 #include "third_party/WebKit/public/web/WebPluginContainer.h" |
94 #include "third_party/WebKit/public/web/WebPluginParams.h" | 93 #include "third_party/WebKit/public/web/WebPluginParams.h" |
95 #include "third_party/WebKit/public/web/WebPluginPlaceholder.h" | |
96 #include "third_party/WebKit/public/web/WebSecurityOrigin.h" | 94 #include "third_party/WebKit/public/web/WebSecurityOrigin.h" |
97 #include "third_party/WebKit/public/web/WebSecurityPolicy.h" | 95 #include "third_party/WebKit/public/web/WebSecurityPolicy.h" |
98 #include "ui/base/l10n/l10n_util.h" | 96 #include "ui/base/l10n/l10n_util.h" |
99 #include "ui/base/layout.h" | 97 #include "ui/base/layout.h" |
100 #include "ui/base/resource/resource_bundle.h" | 98 #include "ui/base/resource/resource_bundle.h" |
101 #include "ui/base/webui/jstemplate_builder.h" | 99 #include "ui/base/webui/jstemplate_builder.h" |
102 #include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR. | 100 #include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR. |
103 | 101 |
104 #if !defined(DISABLE_NACL) | 102 #if !defined(DISABLE_NACL) |
105 #include "components/nacl/common/nacl_constants.h" | 103 #include "components/nacl/common/nacl_constants.h" |
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
636 const WebSecurityOrigin& origin) const { | 634 const WebSecurityOrigin& origin) const { |
637 if (!base::EqualsASCII(base::StringPiece16(origin.protocol()), | 635 if (!base::EqualsASCII(base::StringPiece16(origin.protocol()), |
638 extensions::kExtensionScheme)) | 636 extensions::kExtensionScheme)) |
639 return NULL; | 637 return NULL; |
640 | 638 |
641 const std::string extension_id = origin.host().utf8().data(); | 639 const std::string extension_id = origin.host().utf8().data(); |
642 return extensions::RendererExtensionRegistry::Get()->GetByID(extension_id); | 640 return extensions::RendererExtensionRegistry::Get()->GetByID(extension_id); |
643 } | 641 } |
644 #endif | 642 #endif |
645 | 643 |
646 scoped_ptr<blink::WebPluginPlaceholder> | |
647 ChromeContentRendererClient::CreatePluginPlaceholder( | |
648 content::RenderFrame* render_frame, | |
649 blink::WebLocalFrame* frame, | |
650 const blink::WebPluginParams& orig_params) { | |
651 return CreateShadowDOMPlaceholderForPluginInfo( | |
652 render_frame, frame, orig_params); | |
653 } | |
654 | |
655 bool ChromeContentRendererClient::OverrideCreatePlugin( | 644 bool ChromeContentRendererClient::OverrideCreatePlugin( |
656 content::RenderFrame* render_frame, | 645 content::RenderFrame* render_frame, |
657 blink::WebLocalFrame* frame, | 646 blink::WebLocalFrame* frame, |
658 const WebPluginParams& params, | 647 const WebPluginParams& params, |
659 WebPlugin** plugin) { | 648 WebPlugin** plugin) { |
660 std::string orig_mime_type = params.mimeType.utf8(); | 649 std::string orig_mime_type = params.mimeType.utf8(); |
661 #if defined(ENABLE_EXTENSIONS) | 650 #if defined(ENABLE_EXTENSIONS) |
662 if (orig_mime_type == content::kBrowserPluginMimeType) { | 651 if (orig_mime_type == content::kBrowserPluginMimeType) { |
663 bool guest_view_api_available = false; | 652 bool guest_view_api_available = false; |
664 extension_dispatcher_->script_context_set().ForEach( | 653 extension_dispatcher_->script_context_set().ForEach( |
(...skipping 997 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1662 | 1651 |
1663 void | 1652 void |
1664 ChromeContentRendererClient::DidInitializeServiceWorkerContextOnWorkerThread( | 1653 ChromeContentRendererClient::DidInitializeServiceWorkerContextOnWorkerThread( |
1665 v8::Local<v8::Context> context, | 1654 v8::Local<v8::Context> context, |
1666 const GURL& url) { | 1655 const GURL& url) { |
1667 #if defined(ENABLE_EXTENSIONS) | 1656 #if defined(ENABLE_EXTENSIONS) |
1668 extensions::Dispatcher::DidInitializeServiceWorkerContextOnWorkerThread( | 1657 extensions::Dispatcher::DidInitializeServiceWorkerContextOnWorkerThread( |
1669 context, url); | 1658 context, url); |
1670 #endif | 1659 #endif |
1671 } | 1660 } |
OLD | NEW |