| 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 769 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 780 {"contextMenusHandlers", IDR_CONTEXT_MENUS_HANDLERS_JS}, | 780 {"contextMenusHandlers", IDR_CONTEXT_MENUS_HANDLERS_JS}, |
| 781 {"extension", IDR_EXTENSION_CUSTOM_BINDINGS_JS}, | 781 {"extension", IDR_EXTENSION_CUSTOM_BINDINGS_JS}, |
| 782 {"i18n", IDR_I18N_CUSTOM_BINDINGS_JS}, | 782 {"i18n", IDR_I18N_CUSTOM_BINDINGS_JS}, |
| 783 {"mimeHandlerPrivate", IDR_MIME_HANDLER_PRIVATE_CUSTOM_BINDINGS_JS}, | 783 {"mimeHandlerPrivate", IDR_MIME_HANDLER_PRIVATE_CUSTOM_BINDINGS_JS}, |
| 784 {"extensions/common/api/mime_handler.mojom", IDR_MIME_HANDLER_MOJOM_JS}, | 784 {"extensions/common/api/mime_handler.mojom", IDR_MIME_HANDLER_MOJOM_JS}, |
| 785 {"mojoPrivate", IDR_MOJO_PRIVATE_CUSTOM_BINDINGS_JS}, | 785 {"mojoPrivate", IDR_MOJO_PRIVATE_CUSTOM_BINDINGS_JS}, |
| 786 {"permissions", IDR_PERMISSIONS_CUSTOM_BINDINGS_JS}, | 786 {"permissions", IDR_PERMISSIONS_CUSTOM_BINDINGS_JS}, |
| 787 {"printerProvider", IDR_PRINTER_PROVIDER_CUSTOM_BINDINGS_JS}, | 787 {"printerProvider", IDR_PRINTER_PROVIDER_CUSTOM_BINDINGS_JS}, |
| 788 {"runtime", IDR_RUNTIME_CUSTOM_BINDINGS_JS}, | 788 {"runtime", IDR_RUNTIME_CUSTOM_BINDINGS_JS}, |
| 789 {"webViewRequest", IDR_WEB_VIEW_REQUEST_CUSTOM_BINDINGS_JS}, | 789 {"webViewRequest", IDR_WEB_VIEW_REQUEST_CUSTOM_BINDINGS_JS}, |
| 790 {"binding", IDR_BINDING_JS}, | |
| 791 | |
| 792 // Custom types sources. | |
| 793 {"StorageArea", IDR_STORAGE_AREA_JS}, | |
| 794 | 790 |
| 795 // Platform app sources that are not API-specific.. | 791 // Platform app sources that are not API-specific.. |
| 796 {"platformApp", IDR_PLATFORM_APP_JS}, | 792 {"platformApp", IDR_PLATFORM_APP_JS}, |
| 797 }; | 793 }; |
| 798 | 794 |
| 795 if (!FeatureSwitch::native_crx_bindings()->IsEnabled()) { |
| 796 resources.emplace_back("binding", IDR_BINDING_JS); |
| 797 |
| 798 // Custom types sources. |
| 799 resources.emplace_back("StorageArea", IDR_STORAGE_AREA_JS); |
| 800 } |
| 801 |
| 799 if (base::FeatureList::IsEnabled(::features::kGuestViewCrossProcessFrames)) { | 802 if (base::FeatureList::IsEnabled(::features::kGuestViewCrossProcessFrames)) { |
| 800 resources.emplace_back("guestViewIframe", IDR_GUEST_VIEW_IFRAME_JS); | 803 resources.emplace_back("guestViewIframe", IDR_GUEST_VIEW_IFRAME_JS); |
| 801 resources.emplace_back("guestViewIframeContainer", | 804 resources.emplace_back("guestViewIframeContainer", |
| 802 IDR_GUEST_VIEW_IFRAME_CONTAINER_JS); | 805 IDR_GUEST_VIEW_IFRAME_CONTAINER_JS); |
| 803 } | 806 } |
| 804 | 807 |
| 805 return resources; | 808 return resources; |
| 806 } | 809 } |
| 807 | 810 |
| 808 // NOTE: please use the naming convention "foo_natives" for these. | 811 // NOTE: please use the naming convention "foo_natives" for these. |
| (...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1477 // The "guestViewDeny" module must always be loaded last. It registers | 1480 // The "guestViewDeny" module must always be loaded last. It registers |
| 1478 // error-providing custom elements for the GuestView types that are not | 1481 // error-providing custom elements for the GuestView types that are not |
| 1479 // available, and thus all of those types must have been checked and loaded | 1482 // available, and thus all of those types must have been checked and loaded |
| 1480 // (or not loaded) beforehand. | 1483 // (or not loaded) beforehand. |
| 1481 if (context_type == Feature::BLESSED_EXTENSION_CONTEXT) { | 1484 if (context_type == Feature::BLESSED_EXTENSION_CONTEXT) { |
| 1482 module_system->Require("guestViewDeny"); | 1485 module_system->Require("guestViewDeny"); |
| 1483 } | 1486 } |
| 1484 } | 1487 } |
| 1485 | 1488 |
| 1486 } // namespace extensions | 1489 } // namespace extensions |
| OLD | NEW |