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

Side by Side Diff: extensions/renderer/dispatcher.cc

Issue 2959583002: [Extensions Bindings] Don't load lastError module with native bindings (Closed)
Patch Set: rebase Created 3 years, 5 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 "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 709 matching lines...) Expand 10 before | Expand all | Expand 10 after
720 {"extensionViewEvents", IDR_EXTENSION_VIEW_EVENTS_JS}, 720 {"extensionViewEvents", IDR_EXTENSION_VIEW_EVENTS_JS},
721 {"extensionViewInternal", IDR_EXTENSION_VIEW_INTERNAL_CUSTOM_BINDINGS_JS}, 721 {"extensionViewInternal", IDR_EXTENSION_VIEW_INTERNAL_CUSTOM_BINDINGS_JS},
722 {"fileEntryBindingUtil", IDR_FILE_ENTRY_BINDING_UTIL_JS}, 722 {"fileEntryBindingUtil", IDR_FILE_ENTRY_BINDING_UTIL_JS},
723 {"guestView", IDR_GUEST_VIEW_JS}, 723 {"guestView", IDR_GUEST_VIEW_JS},
724 {"guestViewAttributes", IDR_GUEST_VIEW_ATTRIBUTES_JS}, 724 {"guestViewAttributes", IDR_GUEST_VIEW_ATTRIBUTES_JS},
725 {"guestViewContainer", IDR_GUEST_VIEW_CONTAINER_JS}, 725 {"guestViewContainer", IDR_GUEST_VIEW_CONTAINER_JS},
726 {"guestViewDeny", IDR_GUEST_VIEW_DENY_JS}, 726 {"guestViewDeny", IDR_GUEST_VIEW_DENY_JS},
727 {"guestViewEvents", IDR_GUEST_VIEW_EVENTS_JS}, 727 {"guestViewEvents", IDR_GUEST_VIEW_EVENTS_JS},
728 {"imageUtil", IDR_IMAGE_UTIL_JS}, 728 {"imageUtil", IDR_IMAGE_UTIL_JS},
729 {"json_schema", IDR_JSON_SCHEMA_JS}, 729 {"json_schema", IDR_JSON_SCHEMA_JS},
730 {"lastError", IDR_LAST_ERROR_JS},
731 {"messaging", IDR_MESSAGING_JS}, 730 {"messaging", IDR_MESSAGING_JS},
732 {"messaging_utils", IDR_MESSAGING_UTILS_JS}, 731 {"messaging_utils", IDR_MESSAGING_UTILS_JS},
733 {kSchemaUtils, IDR_SCHEMA_UTILS_JS}, 732 {kSchemaUtils, IDR_SCHEMA_UTILS_JS},
734 {"setIcon", IDR_SET_ICON_JS}, 733 {"setIcon", IDR_SET_ICON_JS},
735 {"test", IDR_TEST_CUSTOM_BINDINGS_JS}, 734 {"test", IDR_TEST_CUSTOM_BINDINGS_JS},
736 {"test_environment_specific_bindings", 735 {"test_environment_specific_bindings",
737 IDR_BROWSER_TEST_ENVIRONMENT_SPECIFIC_BINDINGS_JS}, 736 IDR_BROWSER_TEST_ENVIRONMENT_SPECIFIC_BINDINGS_JS},
738 {"uncaught_exception_handler", IDR_UNCAUGHT_EXCEPTION_HANDLER_JS}, 737 {"uncaught_exception_handler", IDR_UNCAUGHT_EXCEPTION_HANDLER_JS},
739 {"utils", IDR_UTILS_JS}, 738 {"utils", IDR_UTILS_JS},
740 {"webRequest", IDR_WEB_REQUEST_CUSTOM_BINDINGS_JS}, 739 {"webRequest", IDR_WEB_REQUEST_CUSTOM_BINDINGS_JS},
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
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);
803 resources.emplace_back(kEventBindings, IDR_EVENT_BINDINGS_JS); 802 resources.emplace_back(kEventBindings, IDR_EVENT_BINDINGS_JS);
803 resources.emplace_back("lastError", IDR_LAST_ERROR_JS);
804 resources.emplace_back("sendRequest", IDR_SEND_REQUEST_JS); 804 resources.emplace_back("sendRequest", IDR_SEND_REQUEST_JS);
805 805
806 // Custom types sources. 806 // Custom types sources.
807 resources.emplace_back("StorageArea", IDR_STORAGE_AREA_JS); 807 resources.emplace_back("StorageArea", IDR_STORAGE_AREA_JS);
808 } 808 }
809 809
810 if (base::FeatureList::IsEnabled(::features::kGuestViewCrossProcessFrames)) { 810 if (base::FeatureList::IsEnabled(::features::kGuestViewCrossProcessFrames)) {
811 resources.emplace_back("guestViewIframe", IDR_GUEST_VIEW_IFRAME_JS); 811 resources.emplace_back("guestViewIframe", IDR_GUEST_VIEW_IFRAME_JS);
812 resources.emplace_back("guestViewIframeContainer", 812 resources.emplace_back("guestViewIframeContainer",
813 IDR_GUEST_VIEW_IFRAME_CONTAINER_JS); 813 IDR_GUEST_VIEW_IFRAME_CONTAINER_JS);
(...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after
1492 // The "guestViewDeny" module must always be loaded last. It registers 1492 // The "guestViewDeny" module must always be loaded last. It registers
1493 // error-providing custom elements for the GuestView types that are not 1493 // error-providing custom elements for the GuestView types that are not
1494 // available, and thus all of those types must have been checked and loaded 1494 // available, and thus all of those types must have been checked and loaded
1495 // (or not loaded) beforehand. 1495 // (or not loaded) beforehand.
1496 if (context_type == Feature::BLESSED_EXTENSION_CONTEXT) { 1496 if (context_type == Feature::BLESSED_EXTENSION_CONTEXT) {
1497 module_system->Require("guestViewDeny"); 1497 module_system->Require("guestViewDeny");
1498 } 1498 }
1499 } 1499 }
1500 1500
1501 } // namespace extensions 1501 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698