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

Side by Side Diff: chrome/renderer/extensions/chrome_extensions_dispatcher_delegate.cc

Issue 596003002: Allow declarative webrequest and webrequest in extensions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/extensions/chrome_extensions_dispatcher_delegate.h" 5 #include "chrome/renderer/extensions/chrome_extensions_dispatcher_delegate.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/sha1.h" 8 #include "base/sha1.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "chrome/common/chrome_switches.h" 10 #include "chrome/common/chrome_switches.h"
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 IDR_FILE_ENTRY_BINDING_UTIL_JS); 232 IDR_FILE_ENTRY_BINDING_UTIL_JS);
233 source_map->RegisterSource("extensionOptions", IDR_EXTENSION_OPTIONS_JS); 233 source_map->RegisterSource("extensionOptions", IDR_EXTENSION_OPTIONS_JS);
234 source_map->RegisterSource("extensionOptionsEvents", 234 source_map->RegisterSource("extensionOptionsEvents",
235 IDR_EXTENSION_OPTIONS_EVENTS_JS); 235 IDR_EXTENSION_OPTIONS_EVENTS_JS);
236 source_map->RegisterSource("tagWatcher", IDR_TAG_WATCHER_JS); 236 source_map->RegisterSource("tagWatcher", IDR_TAG_WATCHER_JS);
237 source_map->RegisterSource("chromeWebViewInternal", 237 source_map->RegisterSource("chromeWebViewInternal",
238 IDR_CHROME_WEB_VIEW_INTERNAL_CUSTOM_BINDINGS_JS); 238 IDR_CHROME_WEB_VIEW_INTERNAL_CUSTOM_BINDINGS_JS);
239 source_map->RegisterSource("chromeWebView", IDR_CHROME_WEB_VIEW_JS); 239 source_map->RegisterSource("chromeWebView", IDR_CHROME_WEB_VIEW_JS);
240 source_map->RegisterSource("chromeWebViewExperimental", 240 source_map->RegisterSource("chromeWebViewExperimental",
241 IDR_CHROME_WEB_VIEW_EXPERIMENTAL_JS); 241 IDR_CHROME_WEB_VIEW_EXPERIMENTAL_JS);
242 source_map->RegisterSource("webViewRequest",
243 IDR_WEB_VIEW_REQUEST_CUSTOM_BINDINGS_JS);
244 source_map->RegisterSource("denyAppView", IDR_APP_VIEW_DENY_JS); 242 source_map->RegisterSource("denyAppView", IDR_APP_VIEW_DENY_JS);
245 source_map->RegisterSource("injectAppTitlebar", IDR_INJECT_APP_TITLEBAR_JS); 243 source_map->RegisterSource("injectAppTitlebar", IDR_INJECT_APP_TITLEBAR_JS);
246 } 244 }
247 245
248 void ChromeExtensionsDispatcherDelegate::RequireAdditionalModules( 246 void ChromeExtensionsDispatcherDelegate::RequireAdditionalModules(
249 extensions::ScriptContext* context, 247 extensions::ScriptContext* context,
250 bool is_within_platform_app) { 248 bool is_within_platform_app) {
251 extensions::ModuleSystem* module_system = context->module_system(); 249 extensions::ModuleSystem* module_system = context->module_system();
252 extensions::Feature::Context context_type = context->context_type(); 250 extensions::Feature::Context context_type = context->context_type();
253 251
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 if (!extension) 331 if (!extension)
334 return; 332 return;
335 333
336 extension->permissions_data()->UpdateTabSpecificPermissions( 334 extension->permissions_data()->UpdateTabSpecificPermissions(
337 tab_id, 335 tab_id,
338 new extensions::PermissionSet(extensions::APIPermissionSet(), 336 new extensions::PermissionSet(extensions::APIPermissionSet(),
339 extensions::ManifestPermissionSet(), 337 extensions::ManifestPermissionSet(),
340 origin_set, 338 origin_set,
341 extensions::URLPatternSet())); 339 extensions::URLPatternSet()));
342 } 340 }
OLDNEW
« no previous file with comments | « chrome/common/extensions_api_resources.grd ('k') | chrome/renderer/resources/extensions/chrome_web_view.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698