| OLD | NEW |
| 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 Loading... |
| 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); |
| 242 source_map->RegisterSource("denyAppView", IDR_APP_VIEW_DENY_JS); | 244 source_map->RegisterSource("denyAppView", IDR_APP_VIEW_DENY_JS); |
| 243 source_map->RegisterSource("injectAppTitlebar", IDR_INJECT_APP_TITLEBAR_JS); | 245 source_map->RegisterSource("injectAppTitlebar", IDR_INJECT_APP_TITLEBAR_JS); |
| 244 } | 246 } |
| 245 | 247 |
| 246 void ChromeExtensionsDispatcherDelegate::RequireAdditionalModules( | 248 void ChromeExtensionsDispatcherDelegate::RequireAdditionalModules( |
| 247 extensions::ScriptContext* context, | 249 extensions::ScriptContext* context, |
| 248 bool is_within_platform_app) { | 250 bool is_within_platform_app) { |
| 249 extensions::ModuleSystem* module_system = context->module_system(); | 251 extensions::ModuleSystem* module_system = context->module_system(); |
| 250 extensions::Feature::Context context_type = context->context_type(); | 252 extensions::Feature::Context context_type = context->context_type(); |
| 251 | 253 |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 if (!extension) | 333 if (!extension) |
| 332 return; | 334 return; |
| 333 | 335 |
| 334 extension->permissions_data()->UpdateTabSpecificPermissions( | 336 extension->permissions_data()->UpdateTabSpecificPermissions( |
| 335 tab_id, | 337 tab_id, |
| 336 new extensions::PermissionSet(extensions::APIPermissionSet(), | 338 new extensions::PermissionSet(extensions::APIPermissionSet(), |
| 337 extensions::ManifestPermissionSet(), | 339 extensions::ManifestPermissionSet(), |
| 338 origin_set, | 340 origin_set, |
| 339 extensions::URLPatternSet())); | 341 extensions::URLPatternSet())); |
| 340 } | 342 } |
| OLD | NEW |