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" |
46 #include "chrome/renderer/prerender/prerender_dispatcher.h" | 47 #include "chrome/renderer/prerender/prerender_dispatcher.h" |
47 #include "chrome/renderer/prerender/prerender_helper.h" | 48 #include "chrome/renderer/prerender/prerender_helper.h" |
48 #include "chrome/renderer/prerender/prerenderer_client.h" | 49 #include "chrome/renderer/prerender/prerenderer_client.h" |
49 #include "chrome/renderer/safe_browsing/malware_dom_details.h" | 50 #include "chrome/renderer/safe_browsing/malware_dom_details.h" |
50 #include "chrome/renderer/safe_browsing/phishing_classifier_delegate.h" | 51 #include "chrome/renderer/safe_browsing/phishing_classifier_delegate.h" |
51 #include "chrome/renderer/searchbox/search_bouncer.h" | 52 #include "chrome/renderer/searchbox/search_bouncer.h" |
52 #include "chrome/renderer/searchbox/searchbox.h" | 53 #include "chrome/renderer/searchbox/searchbox.h" |
53 #include "chrome/renderer/searchbox/searchbox_extension.h" | 54 #include "chrome/renderer/searchbox/searchbox_extension.h" |
54 #include "chrome/renderer/tts_dispatcher.h" | 55 #include "chrome/renderer/tts_dispatcher.h" |
55 #include "chrome/renderer/worker_content_settings_client_proxy.h" | 56 #include "chrome/renderer/worker_content_settings_client_proxy.h" |
(...skipping 28 matching lines...) Expand all Loading... |
84 #include "third_party/WebKit/public/platform/WebURLError.h" | 85 #include "third_party/WebKit/public/platform/WebURLError.h" |
85 #include "third_party/WebKit/public/platform/WebURLRequest.h" | 86 #include "third_party/WebKit/public/platform/WebURLRequest.h" |
86 #include "third_party/WebKit/public/platform/WebURLResponse.h" | 87 #include "third_party/WebKit/public/platform/WebURLResponse.h" |
87 #include "third_party/WebKit/public/web/WebCache.h" | 88 #include "third_party/WebKit/public/web/WebCache.h" |
88 #include "third_party/WebKit/public/web/WebDataSource.h" | 89 #include "third_party/WebKit/public/web/WebDataSource.h" |
89 #include "third_party/WebKit/public/web/WebDocument.h" | 90 #include "third_party/WebKit/public/web/WebDocument.h" |
90 #include "third_party/WebKit/public/web/WebElement.h" | 91 #include "third_party/WebKit/public/web/WebElement.h" |
91 #include "third_party/WebKit/public/web/WebLocalFrame.h" | 92 #include "third_party/WebKit/public/web/WebLocalFrame.h" |
92 #include "third_party/WebKit/public/web/WebPluginContainer.h" | 93 #include "third_party/WebKit/public/web/WebPluginContainer.h" |
93 #include "third_party/WebKit/public/web/WebPluginParams.h" | 94 #include "third_party/WebKit/public/web/WebPluginParams.h" |
| 95 #include "third_party/WebKit/public/web/WebPluginPlaceholder.h" |
94 #include "third_party/WebKit/public/web/WebSecurityOrigin.h" | 96 #include "third_party/WebKit/public/web/WebSecurityOrigin.h" |
95 #include "third_party/WebKit/public/web/WebSecurityPolicy.h" | 97 #include "third_party/WebKit/public/web/WebSecurityPolicy.h" |
96 #include "ui/base/l10n/l10n_util.h" | 98 #include "ui/base/l10n/l10n_util.h" |
97 #include "ui/base/layout.h" | 99 #include "ui/base/layout.h" |
98 #include "ui/base/resource/resource_bundle.h" | 100 #include "ui/base/resource/resource_bundle.h" |
99 #include "ui/base/webui/jstemplate_builder.h" | 101 #include "ui/base/webui/jstemplate_builder.h" |
100 #include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR. | 102 #include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR. |
101 | 103 |
102 #if !defined(DISABLE_NACL) | 104 #if !defined(DISABLE_NACL) |
103 #include "components/nacl/common/nacl_constants.h" | 105 #include "components/nacl/common/nacl_constants.h" |
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
634 const WebSecurityOrigin& origin) const { | 636 const WebSecurityOrigin& origin) const { |
635 if (!base::EqualsASCII(base::StringPiece16(origin.protocol()), | 637 if (!base::EqualsASCII(base::StringPiece16(origin.protocol()), |
636 extensions::kExtensionScheme)) | 638 extensions::kExtensionScheme)) |
637 return NULL; | 639 return NULL; |
638 | 640 |
639 const std::string extension_id = origin.host().utf8().data(); | 641 const std::string extension_id = origin.host().utf8().data(); |
640 return extensions::RendererExtensionRegistry::Get()->GetByID(extension_id); | 642 return extensions::RendererExtensionRegistry::Get()->GetByID(extension_id); |
641 } | 643 } |
642 #endif | 644 #endif |
643 | 645 |
| 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 |
644 bool ChromeContentRendererClient::OverrideCreatePlugin( | 655 bool ChromeContentRendererClient::OverrideCreatePlugin( |
645 content::RenderFrame* render_frame, | 656 content::RenderFrame* render_frame, |
646 blink::WebLocalFrame* frame, | 657 blink::WebLocalFrame* frame, |
647 const WebPluginParams& params, | 658 const WebPluginParams& params, |
648 WebPlugin** plugin) { | 659 WebPlugin** plugin) { |
649 std::string orig_mime_type = params.mimeType.utf8(); | 660 std::string orig_mime_type = params.mimeType.utf8(); |
650 #if defined(ENABLE_EXTENSIONS) | 661 #if defined(ENABLE_EXTENSIONS) |
651 if (orig_mime_type == content::kBrowserPluginMimeType) { | 662 if (orig_mime_type == content::kBrowserPluginMimeType) { |
652 bool guest_view_api_available = false; | 663 bool guest_view_api_available = false; |
653 extension_dispatcher_->script_context_set().ForEach( | 664 extension_dispatcher_->script_context_set().ForEach( |
(...skipping 997 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1651 | 1662 |
1652 void | 1663 void |
1653 ChromeContentRendererClient::DidInitializeServiceWorkerContextOnWorkerThread( | 1664 ChromeContentRendererClient::DidInitializeServiceWorkerContextOnWorkerThread( |
1654 v8::Local<v8::Context> context, | 1665 v8::Local<v8::Context> context, |
1655 const GURL& url) { | 1666 const GURL& url) { |
1656 #if defined(ENABLE_EXTENSIONS) | 1667 #if defined(ENABLE_EXTENSIONS) |
1657 extensions::Dispatcher::DidInitializeServiceWorkerContextOnWorkerThread( | 1668 extensions::Dispatcher::DidInitializeServiceWorkerContextOnWorkerThread( |
1658 context, url); | 1669 context, url); |
1659 #endif | 1670 #endif |
1660 } | 1671 } |
OLD | NEW |