| 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 751 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 762 std::make_pair(mojo::kConnectionModuleName, IDR_MOJO_CONNECTION_JS)); | 762 std::make_pair(mojo::kConnectionModuleName, IDR_MOJO_CONNECTION_JS)); |
| 763 resources.push_back( | 763 resources.push_back( |
| 764 std::make_pair(mojo::kConnectorModuleName, IDR_MOJO_CONNECTOR_JS)); | 764 std::make_pair(mojo::kConnectorModuleName, IDR_MOJO_CONNECTOR_JS)); |
| 765 resources.push_back( | 765 resources.push_back( |
| 766 std::make_pair(mojo::kRouterModuleName, IDR_MOJO_ROUTER_JS)); | 766 std::make_pair(mojo::kRouterModuleName, IDR_MOJO_ROUTER_JS)); |
| 767 resources.push_back( | 767 resources.push_back( |
| 768 std::make_pair(mojo::kUnicodeModuleName, IDR_MOJO_UNICODE_JS)); | 768 std::make_pair(mojo::kUnicodeModuleName, IDR_MOJO_UNICODE_JS)); |
| 769 resources.push_back( | 769 resources.push_back( |
| 770 std::make_pair(mojo::kValidatorModuleName, IDR_MOJO_VALIDATOR_JS)); | 770 std::make_pair(mojo::kValidatorModuleName, IDR_MOJO_VALIDATOR_JS)); |
| 771 resources.push_back(std::make_pair("async_waiter", IDR_ASYNC_WAITER_JS)); | 771 resources.push_back(std::make_pair("async_waiter", IDR_ASYNC_WAITER_JS)); |
| 772 resources.push_back(std::make_pair("data_receiver", IDR_DATA_RECEIVER_JS)); | |
| 773 resources.push_back(std::make_pair("data_sender", IDR_DATA_SENDER_JS)); | |
| 774 resources.push_back(std::make_pair("keep_alive", IDR_KEEP_ALIVE_JS)); | 772 resources.push_back(std::make_pair("keep_alive", IDR_KEEP_ALIVE_JS)); |
| 775 resources.push_back(std::make_pair("extensions/common/mojo/keep_alive.mojom", | 773 resources.push_back(std::make_pair("extensions/common/mojo/keep_alive.mojom", |
| 776 IDR_KEEP_ALIVE_MOJOM_JS)); | 774 IDR_KEEP_ALIVE_MOJOM_JS)); |
| 777 resources.push_back(std::make_pair("device/serial/data_stream.mojom", | |
| 778 IDR_DATA_STREAM_MOJOM_JS)); | |
| 779 resources.push_back( | |
| 780 std::make_pair("device/serial/data_stream_serialization.mojom", | |
| 781 IDR_DATA_STREAM_SERIALIZATION_MOJOM_JS)); | |
| 782 resources.push_back(std::make_pair("stash_client", IDR_STASH_CLIENT_JS)); | |
| 783 resources.push_back( | |
| 784 std::make_pair("extensions/common/mojo/stash.mojom", IDR_STASH_MOJOM_JS)); | |
| 785 | 775 |
| 786 // Custom bindings. | 776 // Custom bindings. |
| 787 resources.push_back( | 777 resources.push_back( |
| 788 std::make_pair("app.runtime", IDR_APP_RUNTIME_CUSTOM_BINDINGS_JS)); | 778 std::make_pair("app.runtime", IDR_APP_RUNTIME_CUSTOM_BINDINGS_JS)); |
| 789 resources.push_back( | 779 resources.push_back( |
| 790 std::make_pair("app.window", IDR_APP_WINDOW_CUSTOM_BINDINGS_JS)); | 780 std::make_pair("app.window", IDR_APP_WINDOW_CUSTOM_BINDINGS_JS)); |
| 791 resources.push_back( | 781 resources.push_back( |
| 792 std::make_pair("declarativeWebRequest", | 782 std::make_pair("declarativeWebRequest", |
| 793 IDR_DECLARATIVE_WEBREQUEST_CUSTOM_BINDINGS_JS)); | 783 IDR_DECLARATIVE_WEBREQUEST_CUSTOM_BINDINGS_JS)); |
| 794 resources.push_back( | 784 resources.push_back( |
| (...skipping 17 matching lines...) Expand all Loading... |
| 812 resources.push_back(std::make_pair("printerProvider", | 802 resources.push_back(std::make_pair("printerProvider", |
| 813 IDR_PRINTER_PROVIDER_CUSTOM_BINDINGS_JS)); | 803 IDR_PRINTER_PROVIDER_CUSTOM_BINDINGS_JS)); |
| 814 resources.push_back( | 804 resources.push_back( |
| 815 std::make_pair("runtime", IDR_RUNTIME_CUSTOM_BINDINGS_JS)); | 805 std::make_pair("runtime", IDR_RUNTIME_CUSTOM_BINDINGS_JS)); |
| 816 resources.push_back(std::make_pair("windowControls", IDR_WINDOW_CONTROLS_JS)); | 806 resources.push_back(std::make_pair("windowControls", IDR_WINDOW_CONTROLS_JS)); |
| 817 resources.push_back( | 807 resources.push_back( |
| 818 std::make_pair("webViewRequest", | 808 std::make_pair("webViewRequest", |
| 819 IDR_WEB_VIEW_REQUEST_CUSTOM_BINDINGS_JS)); | 809 IDR_WEB_VIEW_REQUEST_CUSTOM_BINDINGS_JS)); |
| 820 resources.push_back(std::make_pair("binding", IDR_BINDING_JS)); | 810 resources.push_back(std::make_pair("binding", IDR_BINDING_JS)); |
| 821 | 811 |
| 822 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | |
| 823 switches::kEnableMojoSerialService)) { | |
| 824 resources.push_back( | |
| 825 std::make_pair("serial", IDR_SERIAL_CUSTOM_BINDINGS_JS)); | |
| 826 } | |
| 827 resources.push_back(std::make_pair("serial_service", IDR_SERIAL_SERVICE_JS)); | |
| 828 resources.push_back( | |
| 829 std::make_pair("device/serial/serial.mojom", IDR_SERIAL_MOJOM_JS)); | |
| 830 resources.push_back(std::make_pair("device/serial/serial_serialization.mojom", | |
| 831 IDR_SERIAL_SERIALIZATION_MOJOM_JS)); | |
| 832 | |
| 833 // Custom types sources. | 812 // Custom types sources. |
| 834 resources.push_back(std::make_pair("StorageArea", IDR_STORAGE_AREA_JS)); | 813 resources.push_back(std::make_pair("StorageArea", IDR_STORAGE_AREA_JS)); |
| 835 | 814 |
| 836 // Platform app sources that are not API-specific.. | 815 // Platform app sources that are not API-specific.. |
| 837 resources.push_back(std::make_pair("platformApp", IDR_PLATFORM_APP_JS)); | 816 resources.push_back(std::make_pair("platformApp", IDR_PLATFORM_APP_JS)); |
| 838 | 817 |
| 839 #if defined(ENABLE_MEDIA_ROUTER) | 818 #if defined(ENABLE_MEDIA_ROUTER) |
| 840 resources.push_back( | 819 resources.push_back( |
| 841 std::make_pair("chrome/browser/media/router/mojo/media_router.mojom", | 820 std::make_pair("chrome/browser/media/router/mojo/media_router.mojom", |
| 842 IDR_MEDIA_ROUTER_MOJOM_JS)); | 821 IDR_MEDIA_ROUTER_MOJOM_JS)); |
| (...skipping 829 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1672 // The "guestViewDeny" module must always be loaded last. It registers | 1651 // The "guestViewDeny" module must always be loaded last. It registers |
| 1673 // error-providing custom elements for the GuestView types that are not | 1652 // error-providing custom elements for the GuestView types that are not |
| 1674 // available, and thus all of those types must have been checked and loaded | 1653 // available, and thus all of those types must have been checked and loaded |
| 1675 // (or not loaded) beforehand. | 1654 // (or not loaded) beforehand. |
| 1676 if (context_type == Feature::BLESSED_EXTENSION_CONTEXT) { | 1655 if (context_type == Feature::BLESSED_EXTENSION_CONTEXT) { |
| 1677 module_system->Require("guestViewDeny"); | 1656 module_system->Require("guestViewDeny"); |
| 1678 } | 1657 } |
| 1679 } | 1658 } |
| 1680 | 1659 |
| 1681 } // namespace extensions | 1660 } // namespace extensions |
| OLD | NEW |