| 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 <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 #include "chrome/common/extensions/api/extension_action/page_action_handler.h" | 21 #include "chrome/common/extensions/api/extension_action/page_action_handler.h" |
| 22 #include "chrome/common/extensions/background_info.h" | 22 #include "chrome/common/extensions/background_info.h" |
| 23 #include "chrome/common/extensions/csp_handler.h" | 23 #include "chrome/common/extensions/csp_handler.h" |
| 24 #include "chrome/common/extensions/extension.h" | 24 #include "chrome/common/extensions/extension.h" |
| 25 #include "chrome/common/extensions/extension_constants.h" | 25 #include "chrome/common/extensions/extension_constants.h" |
| 26 #include "chrome/common/extensions/extension_manifest_constants.h" | 26 #include "chrome/common/extensions/extension_manifest_constants.h" |
| 27 #include "chrome/common/extensions/extension_process_policy.h" | 27 #include "chrome/common/extensions/extension_process_policy.h" |
| 28 #include "chrome/common/extensions/extension_set.h" | 28 #include "chrome/common/extensions/extension_set.h" |
| 29 #include "chrome/common/extensions/manifest_handler.h" | 29 #include "chrome/common/extensions/manifest_handler.h" |
| 30 #include "chrome/common/extensions/manifest_url_handler.h" | 30 #include "chrome/common/extensions/manifest_url_handler.h" |
| 31 #include "chrome/common/extensions/sandboxed_handler.h" |
| 31 #include "chrome/common/extensions/web_accessible_resources_handler.h" | 32 #include "chrome/common/extensions/web_accessible_resources_handler.h" |
| 32 #include "chrome/common/external_ipc_fuzzer.h" | 33 #include "chrome/common/external_ipc_fuzzer.h" |
| 33 #include "chrome/common/localized_error.h" | 34 #include "chrome/common/localized_error.h" |
| 34 #include "chrome/common/render_messages.h" | 35 #include "chrome/common/render_messages.h" |
| 35 #include "chrome/common/url_constants.h" | 36 #include "chrome/common/url_constants.h" |
| 36 #include "chrome/renderer/benchmarking_extension.h" | 37 #include "chrome/renderer/benchmarking_extension.h" |
| 37 #include "chrome/renderer/chrome_render_process_observer.h" | 38 #include "chrome/renderer/chrome_render_process_observer.h" |
| 38 #include "chrome/renderer/chrome_render_view_observer.h" | 39 #include "chrome/renderer/chrome_render_view_observer.h" |
| 39 #include "chrome/renderer/content_settings_observer.h" | 40 #include "chrome/renderer/content_settings_observer.h" |
| 40 #include "chrome/renderer/extensions/chrome_v8_context.h" | 41 #include "chrome/renderer/extensions/chrome_v8_context.h" |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 | 135 |
| 135 // Explicitly register all extension ManifestHandlers needed to parse | 136 // Explicitly register all extension ManifestHandlers needed to parse |
| 136 // fields used in the renderer. | 137 // fields used in the renderer. |
| 137 void RegisterExtensionManifestHandlers() { | 138 void RegisterExtensionManifestHandlers() { |
| 138 (new extensions::BackgroundManifestHandler)->Register(); | 139 (new extensions::BackgroundManifestHandler)->Register(); |
| 139 (new extensions::DevToolsPageHandler)->Register(); | 140 (new extensions::DevToolsPageHandler)->Register(); |
| 140 (new extensions::WebAccessibleResourcesHandler)->Register(); | 141 (new extensions::WebAccessibleResourcesHandler)->Register(); |
| 141 (new extensions::PageActionHandler)->Register(); | 142 (new extensions::PageActionHandler)->Register(); |
| 142 (new extensions::CSPHandler(false))->Register(); // not platform app. | 143 (new extensions::CSPHandler(false))->Register(); // not platform app. |
| 143 (new extensions::CSPHandler(true))->Register(); // platform app. | 144 (new extensions::CSPHandler(true))->Register(); // platform app. |
| 145 (new extensions::SandboxedHandler)->Register(); |
| 144 } | 146 } |
| 145 | 147 |
| 146 static void AppendParams(const std::vector<string16>& additional_names, | 148 static void AppendParams(const std::vector<string16>& additional_names, |
| 147 const std::vector<string16>& additional_values, | 149 const std::vector<string16>& additional_values, |
| 148 WebVector<WebString>* existing_names, | 150 WebVector<WebString>* existing_names, |
| 149 WebVector<WebString>* existing_values) { | 151 WebVector<WebString>* existing_values) { |
| 150 DCHECK(additional_names.size() == additional_values.size()); | 152 DCHECK(additional_names.size() == additional_values.size()); |
| 151 DCHECK(existing_names->size() == existing_values->size()); | 153 DCHECK(existing_names->size() == existing_values->size()); |
| 152 | 154 |
| 153 size_t existing_size = existing_names->size(); | 155 size_t existing_size = existing_names->size(); |
| (...skipping 969 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1123 if (container->element().shadowHost().tagName().equals( | 1125 if (container->element().shadowHost().tagName().equals( |
| 1124 WebKit::WebString::fromUTF8(kWebViewTagName))) { | 1126 WebKit::WebString::fromUTF8(kWebViewTagName))) { |
| 1125 return true; | 1127 return true; |
| 1126 } else { | 1128 } else { |
| 1127 return CommandLine::ForCurrentProcess()->HasSwitch( | 1129 return CommandLine::ForCurrentProcess()->HasSwitch( |
| 1128 switches::kEnableBrowserPluginForAllViewTypes); | 1130 switches::kEnableBrowserPluginForAllViewTypes); |
| 1129 } | 1131 } |
| 1130 } | 1132 } |
| 1131 | 1133 |
| 1132 } // namespace chrome | 1134 } // namespace chrome |
| OLD | NEW |