Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: chrome/renderer/chrome_content_renderer_client.cc

Issue 11821009: move 'web_accessible_resources' parsing out of Extension class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@url_parse
Patch Set: patch rebased Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/metrics/histogram.h" 12 #include "base/metrics/histogram.h"
13 #include "base/path_service.h" 13 #include "base/path_service.h"
14 #include "base/string_tokenizer.h" 14 #include "base/string_tokenizer.h"
15 #include "base/utf_string_conversions.h" 15 #include "base/utf_string_conversions.h"
16 #include "base/values.h" 16 #include "base/values.h"
17 #include "chrome/common/child_process_logging.h" 17 #include "chrome/common/child_process_logging.h"
18 #include "chrome/common/chrome_content_client.h" 18 #include "chrome/common/chrome_content_client.h"
19 #include "chrome/common/chrome_paths.h" 19 #include "chrome/common/chrome_paths.h"
20 #include "chrome/common/chrome_switches.h" 20 #include "chrome/common/chrome_switches.h"
21 #include "chrome/common/content_settings_pattern.h" 21 #include "chrome/common/content_settings_pattern.h"
22 #include "chrome/common/extensions/extension.h" 22 #include "chrome/common/extensions/extension.h"
23 #include "chrome/common/extensions/extension_constants.h" 23 #include "chrome/common/extensions/extension_constants.h"
24 #include "chrome/common/extensions/extension_manifest_constants.h" 24 #include "chrome/common/extensions/extension_manifest_constants.h"
25 #include "chrome/common/extensions/extension_process_policy.h" 25 #include "chrome/common/extensions/extension_process_policy.h"
26 #include "chrome/common/extensions/extension_set.h" 26 #include "chrome/common/extensions/extension_set.h"
27 #include "chrome/common/extensions/manifest_handler.h" 27 #include "chrome/common/extensions/manifest_handler.h"
28 #include "chrome/common/extensions/manifest_url_handler.h" 28 #include "chrome/common/extensions/manifest_url_handler.h"
29 #include "chrome/common/extensions/web_accessible_resources_handler.h"
29 #include "chrome/common/external_ipc_fuzzer.h" 30 #include "chrome/common/external_ipc_fuzzer.h"
30 #include "chrome/common/jstemplate_builder.h" 31 #include "chrome/common/jstemplate_builder.h"
31 #include "chrome/common/localized_error.h" 32 #include "chrome/common/localized_error.h"
32 #include "chrome/common/render_messages.h" 33 #include "chrome/common/render_messages.h"
33 #include "chrome/common/url_constants.h" 34 #include "chrome/common/url_constants.h"
34 #include "chrome/renderer/autofill/autofill_agent.h" 35 #include "chrome/renderer/autofill/autofill_agent.h"
35 #include "chrome/renderer/autofill/password_autofill_manager.h" 36 #include "chrome/renderer/autofill/password_autofill_manager.h"
36 #include "chrome/renderer/autofill/password_generation_manager.h" 37 #include "chrome/renderer/autofill/password_generation_manager.h"
37 #include "chrome/renderer/automation/automation_renderer_helper.h" 38 #include "chrome/renderer/automation/automation_renderer_helper.h"
38 #include "chrome/renderer/benchmarking_extension.h" 39 #include "chrome/renderer/benchmarking_extension.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 using WebKit::WebVector; 120 using WebKit::WebVector;
120 121
121 namespace { 122 namespace {
122 123
123 // Explicitly register all extension ManifestHandlers needed to parse 124 // Explicitly register all extension ManifestHandlers needed to parse
124 // fields used in the renderer. 125 // fields used in the renderer.
125 void RegisterExtensionManifestHandlers() { 126 void RegisterExtensionManifestHandlers() {
126 extensions::ManifestHandler::Register( 127 extensions::ManifestHandler::Register(
127 extension_manifest_keys::kDevToolsPage, 128 extension_manifest_keys::kDevToolsPage,
128 new extensions::DevToolsPageHandler); 129 new extensions::DevToolsPageHandler);
130 extensions::ManifestHandler::Register(
131 extension_manifest_keys::kWebAccessibleResources,
132 new extensions::WebAccessibleResourcesHandler);
129 } 133 }
130 134
131 static void AppendParams(const std::vector<string16>& additional_names, 135 static void AppendParams(const std::vector<string16>& additional_names,
132 const std::vector<string16>& additional_values, 136 const std::vector<string16>& additional_values,
133 WebVector<WebString>* existing_names, 137 WebVector<WebString>* existing_names,
134 WebVector<WebString>* existing_values) { 138 WebVector<WebString>* existing_values) {
135 DCHECK(additional_names.size() == additional_values.size()); 139 DCHECK(additional_names.size() == additional_values.size());
136 DCHECK(existing_names->size() == existing_values->size()); 140 DCHECK(existing_names->size() == existing_values->size());
137 141
138 size_t existing_size = existing_names->size(); 142 size_t existing_size = existing_names->size();
(...skipping 896 matching lines...) Expand 10 before | Expand all | Expand 10 after
1035 } 1039 }
1036 1040
1037 void ChromeContentRendererClient::RegisterPPAPIInterfaceFactories( 1041 void ChromeContentRendererClient::RegisterPPAPIInterfaceFactories(
1038 webkit::ppapi::PpapiInterfaceFactoryManager* factory_manager) { 1042 webkit::ppapi::PpapiInterfaceFactoryManager* factory_manager) {
1039 #if defined(ENABLE_PLUGINS) 1043 #if defined(ENABLE_PLUGINS)
1040 factory_manager->RegisterFactory(ChromePPAPIInterfaceFactory); 1044 factory_manager->RegisterFactory(ChromePPAPIInterfaceFactory);
1041 #endif 1045 #endif
1042 } 1046 }
1043 1047
1044 } // namespace chrome 1048 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/common/extensions/web_accessible_resources_handler.cc ('k') | chrome/renderer/extensions/resource_request_policy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698