| 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 "extensions/renderer/dispatcher.h" |     5 #include "extensions/renderer/dispatcher.h" | 
|     6  |     6  | 
|     7 #include <stddef.h> |     7 #include <stddef.h> | 
|     8  |     8  | 
|     9 #include <memory> |     9 #include <memory> | 
|    10 #include <utility> |    10 #include <utility> | 
| (...skipping 689 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   700         kInitialExtensionIdleHandlerDelayMs); |   700         kInitialExtensionIdleHandlerDelayMs); | 
|   701   } |   701   } | 
|   702 } |   702 } | 
|   703  |   703  | 
|   704 // static |   704 // static | 
|   705 std::vector<std::pair<const char*, int>> Dispatcher::GetJsResources() { |   705 std::vector<std::pair<const char*, int>> Dispatcher::GetJsResources() { | 
|   706   // Libraries. |   706   // Libraries. | 
|   707   std::vector<std::pair<const char*, int>> resources = { |   707   std::vector<std::pair<const char*, int>> resources = { | 
|   708       {"appView", IDR_APP_VIEW_JS}, |   708       {"appView", IDR_APP_VIEW_JS}, | 
|   709       {"entryIdManager", IDR_ENTRY_ID_MANAGER}, |   709       {"entryIdManager", IDR_ENTRY_ID_MANAGER}, | 
|   710       {kEventBindings, IDR_EVENT_BINDINGS_JS}, |  | 
|   711       {"extensionOptions", IDR_EXTENSION_OPTIONS_JS}, |   710       {"extensionOptions", IDR_EXTENSION_OPTIONS_JS}, | 
|   712       {"extensionOptionsAttributes", IDR_EXTENSION_OPTIONS_ATTRIBUTES_JS}, |   711       {"extensionOptionsAttributes", IDR_EXTENSION_OPTIONS_ATTRIBUTES_JS}, | 
|   713       {"extensionOptionsConstants", IDR_EXTENSION_OPTIONS_CONSTANTS_JS}, |   712       {"extensionOptionsConstants", IDR_EXTENSION_OPTIONS_CONSTANTS_JS}, | 
|   714       {"extensionOptionsEvents", IDR_EXTENSION_OPTIONS_EVENTS_JS}, |   713       {"extensionOptionsEvents", IDR_EXTENSION_OPTIONS_EVENTS_JS}, | 
|   715       {"extensionView", IDR_EXTENSION_VIEW_JS}, |   714       {"extensionView", IDR_EXTENSION_VIEW_JS}, | 
|   716       {"extensionViewApiMethods", IDR_EXTENSION_VIEW_API_METHODS_JS}, |   715       {"extensionViewApiMethods", IDR_EXTENSION_VIEW_API_METHODS_JS}, | 
|   717       {"extensionViewAttributes", IDR_EXTENSION_VIEW_ATTRIBUTES_JS}, |   716       {"extensionViewAttributes", IDR_EXTENSION_VIEW_ATTRIBUTES_JS}, | 
|   718       {"extensionViewConstants", IDR_EXTENSION_VIEW_CONSTANTS_JS}, |   717       {"extensionViewConstants", IDR_EXTENSION_VIEW_CONSTANTS_JS}, | 
|   719       {"extensionViewEvents", IDR_EXTENSION_VIEW_EVENTS_JS}, |   718       {"extensionViewEvents", IDR_EXTENSION_VIEW_EVENTS_JS}, | 
|   720       {"extensionViewInternal", IDR_EXTENSION_VIEW_INTERNAL_CUSTOM_BINDINGS_JS}, |   719       {"extensionViewInternal", IDR_EXTENSION_VIEW_INTERNAL_CUSTOM_BINDINGS_JS}, | 
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   793       {"printerProvider", IDR_PRINTER_PROVIDER_CUSTOM_BINDINGS_JS}, |   792       {"printerProvider", IDR_PRINTER_PROVIDER_CUSTOM_BINDINGS_JS}, | 
|   794       {"runtime", IDR_RUNTIME_CUSTOM_BINDINGS_JS}, |   793       {"runtime", IDR_RUNTIME_CUSTOM_BINDINGS_JS}, | 
|   795       {"webViewRequest", IDR_WEB_VIEW_REQUEST_CUSTOM_BINDINGS_JS}, |   794       {"webViewRequest", IDR_WEB_VIEW_REQUEST_CUSTOM_BINDINGS_JS}, | 
|   796  |   795  | 
|   797       // Platform app sources that are not API-specific.. |   796       // Platform app sources that are not API-specific.. | 
|   798       {"platformApp", IDR_PLATFORM_APP_JS}, |   797       {"platformApp", IDR_PLATFORM_APP_JS}, | 
|   799   }; |   798   }; | 
|   800  |   799  | 
|   801   if (!FeatureSwitch::native_crx_bindings()->IsEnabled()) { |   800   if (!FeatureSwitch::native_crx_bindings()->IsEnabled()) { | 
|   802     resources.emplace_back("binding", IDR_BINDING_JS); |   801     resources.emplace_back("binding", IDR_BINDING_JS); | 
 |   802     resources.emplace_back(kEventBindings, IDR_EVENT_BINDINGS_JS); | 
|   803  |   803  | 
|   804     // Custom types sources. |   804     // Custom types sources. | 
|   805     resources.emplace_back("StorageArea", IDR_STORAGE_AREA_JS); |   805     resources.emplace_back("StorageArea", IDR_STORAGE_AREA_JS); | 
|   806   } |   806   } | 
|   807  |   807  | 
|   808   if (base::FeatureList::IsEnabled(::features::kGuestViewCrossProcessFrames)) { |   808   if (base::FeatureList::IsEnabled(::features::kGuestViewCrossProcessFrames)) { | 
|   809     resources.emplace_back("guestViewIframe", IDR_GUEST_VIEW_IFRAME_JS); |   809     resources.emplace_back("guestViewIframe", IDR_GUEST_VIEW_IFRAME_JS); | 
|   810     resources.emplace_back("guestViewIframeContainer", |   810     resources.emplace_back("guestViewIframeContainer", | 
|   811                            IDR_GUEST_VIEW_IFRAME_CONTAINER_JS); |   811                            IDR_GUEST_VIEW_IFRAME_CONTAINER_JS); | 
|   812   } |   812   } | 
| (...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1491   // The "guestViewDeny" module must always be loaded last. It registers |  1491   // The "guestViewDeny" module must always be loaded last. It registers | 
|  1492   // error-providing custom elements for the GuestView types that are not |  1492   // error-providing custom elements for the GuestView types that are not | 
|  1493   // available, and thus all of those types must have been checked and loaded |  1493   // available, and thus all of those types must have been checked and loaded | 
|  1494   // (or not loaded) beforehand. |  1494   // (or not loaded) beforehand. | 
|  1495   if (context_type == Feature::BLESSED_EXTENSION_CONTEXT) { |  1495   if (context_type == Feature::BLESSED_EXTENSION_CONTEXT) { | 
|  1496     module_system->Require("guestViewDeny"); |  1496     module_system->Require("guestViewDeny"); | 
|  1497   } |  1497   } | 
|  1498 } |  1498 } | 
|  1499  |  1499  | 
|  1500 }  // namespace extensions |  1500 }  // namespace extensions | 
| OLD | NEW |