| 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/incognito_handler.h" | 29 #include "chrome/common/extensions/incognito_handler.h" |
| 30 #include "chrome/common/extensions/manifest_handler.h" | 30 #include "chrome/common/extensions/manifest_handler.h" |
| 31 #include "chrome/common/extensions/manifest_handlers/sandboxed_page_info.h" |
| 31 #include "chrome/common/extensions/manifest_url_handler.h" | 32 #include "chrome/common/extensions/manifest_url_handler.h" |
| 32 #include "chrome/common/extensions/web_accessible_resources_handler.h" | 33 #include "chrome/common/extensions/web_accessible_resources_handler.h" |
| 33 #include "chrome/common/external_ipc_fuzzer.h" | 34 #include "chrome/common/external_ipc_fuzzer.h" |
| 34 #include "chrome/common/localized_error.h" | 35 #include "chrome/common/localized_error.h" |
| 35 #include "chrome/common/render_messages.h" | 36 #include "chrome/common/render_messages.h" |
| 36 #include "chrome/common/url_constants.h" | 37 #include "chrome/common/url_constants.h" |
| 37 #include "chrome/renderer/benchmarking_extension.h" | 38 #include "chrome/renderer/benchmarking_extension.h" |
| 38 #include "chrome/renderer/chrome_render_process_observer.h" | 39 #include "chrome/renderer/chrome_render_process_observer.h" |
| 39 #include "chrome/renderer/chrome_render_view_observer.h" | 40 #include "chrome/renderer/chrome_render_view_observer.h" |
| 40 #include "chrome/renderer/content_settings_observer.h" | 41 #include "chrome/renderer/content_settings_observer.h" |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 | 134 |
| 134 namespace { | 135 namespace { |
| 135 | 136 |
| 136 const char kWebViewTagName[] = "WEBVIEW"; | 137 const char kWebViewTagName[] = "WEBVIEW"; |
| 137 const char kAdViewTagName[] = "ADVIEW"; | 138 const char kAdViewTagName[] = "ADVIEW"; |
| 138 | 139 |
| 139 // Explicitly register all extension ManifestHandlers needed to parse | 140 // Explicitly register all extension ManifestHandlers needed to parse |
| 140 // fields used in the renderer. | 141 // fields used in the renderer. |
| 141 void RegisterExtensionManifestHandlers() { | 142 void RegisterExtensionManifestHandlers() { |
| 142 (new extensions::BackgroundManifestHandler)->Register(); | 143 (new extensions::BackgroundManifestHandler)->Register(); |
| 143 (new extensions::DevToolsPageHandler)->Register(); | |
| 144 (new extensions::WebAccessibleResourcesHandler)->Register(); | |
| 145 (new extensions::PageActionHandler)->Register(); | |
| 146 (new extensions::CSPHandler(false))->Register(); // not platform app. | 144 (new extensions::CSPHandler(false))->Register(); // not platform app. |
| 147 (new extensions::CSPHandler(true))->Register(); // platform app. | 145 (new extensions::CSPHandler(true))->Register(); // platform app. |
| 146 (new extensions::DevToolsPageHandler)->Register(); |
| 148 (new extensions::IncognitoHandler)->Register(); | 147 (new extensions::IncognitoHandler)->Register(); |
| 148 (new extensions::PageActionHandler)->Register(); |
| 149 (new extensions::SandboxedPageHandler)->Register(); |
| 150 (new extensions::WebAccessibleResourcesHandler)->Register(); |
| 149 } | 151 } |
| 150 | 152 |
| 151 static void AppendParams(const std::vector<string16>& additional_names, | 153 static void AppendParams(const std::vector<string16>& additional_names, |
| 152 const std::vector<string16>& additional_values, | 154 const std::vector<string16>& additional_values, |
| 153 WebVector<WebString>* existing_names, | 155 WebVector<WebString>* existing_names, |
| 154 WebVector<WebString>* existing_values) { | 156 WebVector<WebString>* existing_values) { |
| 155 DCHECK(additional_names.size() == additional_values.size()); | 157 DCHECK(additional_names.size() == additional_values.size()); |
| 156 DCHECK(existing_names->size() == existing_values->size()); | 158 DCHECK(existing_names->size() == existing_values->size()); |
| 157 | 159 |
| 158 size_t existing_size = existing_names->size(); | 160 size_t existing_size = existing_names->size(); |
| (...skipping 1027 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1186 | 1188 |
| 1187 if (container->element().shadowHost().isNull()) | 1189 if (container->element().shadowHost().isNull()) |
| 1188 return false; | 1190 return false; |
| 1189 | 1191 |
| 1190 WebString tag_name = container->element().shadowHost().tagName(); | 1192 WebString tag_name = container->element().shadowHost().tagName(); |
| 1191 return tag_name.equals(WebString::fromUTF8(kWebViewTagName)) || | 1193 return tag_name.equals(WebString::fromUTF8(kWebViewTagName)) || |
| 1192 tag_name.equals(WebString::fromUTF8(kAdViewTagName)); | 1194 tag_name.equals(WebString::fromUTF8(kAdViewTagName)); |
| 1193 } | 1195 } |
| 1194 | 1196 |
| 1195 } // namespace chrome | 1197 } // namespace chrome |
| OLD | NEW |