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

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

Issue 2960523002: [Extensions Bindings] Don't load sendRequest module with native bindings (Closed)
Patch Set: remove debug log 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
« no previous file with comments | « no previous file | extensions/renderer/resources/set_icon.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 710 matching lines...) Expand 10 before | Expand all | Expand 10 after
721 {"guestViewAttributes", IDR_GUEST_VIEW_ATTRIBUTES_JS}, 721 {"guestViewAttributes", IDR_GUEST_VIEW_ATTRIBUTES_JS},
722 {"guestViewContainer", IDR_GUEST_VIEW_CONTAINER_JS}, 722 {"guestViewContainer", IDR_GUEST_VIEW_CONTAINER_JS},
723 {"guestViewDeny", IDR_GUEST_VIEW_DENY_JS}, 723 {"guestViewDeny", IDR_GUEST_VIEW_DENY_JS},
724 {"guestViewEvents", IDR_GUEST_VIEW_EVENTS_JS}, 724 {"guestViewEvents", IDR_GUEST_VIEW_EVENTS_JS},
725 {"imageUtil", IDR_IMAGE_UTIL_JS}, 725 {"imageUtil", IDR_IMAGE_UTIL_JS},
726 {"json_schema", IDR_JSON_SCHEMA_JS}, 726 {"json_schema", IDR_JSON_SCHEMA_JS},
727 {"lastError", IDR_LAST_ERROR_JS}, 727 {"lastError", IDR_LAST_ERROR_JS},
728 {"messaging", IDR_MESSAGING_JS}, 728 {"messaging", IDR_MESSAGING_JS},
729 {"messaging_utils", IDR_MESSAGING_UTILS_JS}, 729 {"messaging_utils", IDR_MESSAGING_UTILS_JS},
730 {kSchemaUtils, IDR_SCHEMA_UTILS_JS}, 730 {kSchemaUtils, IDR_SCHEMA_UTILS_JS},
731 {"sendRequest", IDR_SEND_REQUEST_JS},
732 {"setIcon", IDR_SET_ICON_JS}, 731 {"setIcon", IDR_SET_ICON_JS},
733 {"test", IDR_TEST_CUSTOM_BINDINGS_JS}, 732 {"test", IDR_TEST_CUSTOM_BINDINGS_JS},
734 {"test_environment_specific_bindings", 733 {"test_environment_specific_bindings",
735 IDR_BROWSER_TEST_ENVIRONMENT_SPECIFIC_BINDINGS_JS}, 734 IDR_BROWSER_TEST_ENVIRONMENT_SPECIFIC_BINDINGS_JS},
736 {"uncaught_exception_handler", IDR_UNCAUGHT_EXCEPTION_HANDLER_JS}, 735 {"uncaught_exception_handler", IDR_UNCAUGHT_EXCEPTION_HANDLER_JS},
737 {"utils", IDR_UTILS_JS}, 736 {"utils", IDR_UTILS_JS},
738 {"webRequest", IDR_WEB_REQUEST_CUSTOM_BINDINGS_JS}, 737 {"webRequest", IDR_WEB_REQUEST_CUSTOM_BINDINGS_JS},
739 {"webRequestEvent", IDR_WEB_REQUEST_EVENT_JS}, 738 {"webRequestEvent", IDR_WEB_REQUEST_EVENT_JS},
740 // Note: webView not webview so that this doesn't interfere with the 739 // Note: webView not webview so that this doesn't interfere with the
741 // chrome.webview API bindings. 740 // chrome.webview API bindings.
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
792 {"runtime", IDR_RUNTIME_CUSTOM_BINDINGS_JS}, 791 {"runtime", IDR_RUNTIME_CUSTOM_BINDINGS_JS},
793 {"webViewRequest", IDR_WEB_VIEW_REQUEST_CUSTOM_BINDINGS_JS}, 792 {"webViewRequest", IDR_WEB_VIEW_REQUEST_CUSTOM_BINDINGS_JS},
794 793
795 // Platform app sources that are not API-specific.. 794 // Platform app sources that are not API-specific..
796 {"platformApp", IDR_PLATFORM_APP_JS}, 795 {"platformApp", IDR_PLATFORM_APP_JS},
797 }; 796 };
798 797
799 if (!FeatureSwitch::native_crx_bindings()->IsEnabled()) { 798 if (!FeatureSwitch::native_crx_bindings()->IsEnabled()) {
800 resources.emplace_back("binding", IDR_BINDING_JS); 799 resources.emplace_back("binding", IDR_BINDING_JS);
801 resources.emplace_back(kEventBindings, IDR_EVENT_BINDINGS_JS); 800 resources.emplace_back(kEventBindings, IDR_EVENT_BINDINGS_JS);
801 resources.emplace_back("sendRequest", IDR_SEND_REQUEST_JS);
802 802
803 // Custom types sources. 803 // Custom types sources.
804 resources.emplace_back("StorageArea", IDR_STORAGE_AREA_JS); 804 resources.emplace_back("StorageArea", IDR_STORAGE_AREA_JS);
805 } 805 }
806 806
807 if (base::FeatureList::IsEnabled(::features::kGuestViewCrossProcessFrames)) { 807 if (base::FeatureList::IsEnabled(::features::kGuestViewCrossProcessFrames)) {
808 resources.emplace_back("guestViewIframe", IDR_GUEST_VIEW_IFRAME_JS); 808 resources.emplace_back("guestViewIframe", IDR_GUEST_VIEW_IFRAME_JS);
809 resources.emplace_back("guestViewIframeContainer", 809 resources.emplace_back("guestViewIframeContainer",
810 IDR_GUEST_VIEW_IFRAME_CONTAINER_JS); 810 IDR_GUEST_VIEW_IFRAME_CONTAINER_JS);
811 } 811 }
(...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after
1490 // The "guestViewDeny" module must always be loaded last. It registers 1490 // The "guestViewDeny" module must always be loaded last. It registers
1491 // error-providing custom elements for the GuestView types that are not 1491 // error-providing custom elements for the GuestView types that are not
1492 // available, and thus all of those types must have been checked and loaded 1492 // available, and thus all of those types must have been checked and loaded
1493 // (or not loaded) beforehand. 1493 // (or not loaded) beforehand.
1494 if (context_type == Feature::BLESSED_EXTENSION_CONTEXT) { 1494 if (context_type == Feature::BLESSED_EXTENSION_CONTEXT) {
1495 module_system->Require("guestViewDeny"); 1495 module_system->Require("guestViewDeny");
1496 } 1496 }
1497 } 1497 }
1498 1498
1499 } // namespace extensions 1499 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | extensions/renderer/resources/set_icon.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698