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

Unified Diff: extensions/renderer/dispatcher.cc

Issue 652313002: Enable the mojo-based serial API in the renderer behind a flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojo-js-natives-registration
Patch Set: fix windows build Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « extensions/renderer/api/serial/serial_api_unittest.cc ('k') | extensions/renderer/module_system.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/dispatcher.cc
diff --git a/extensions/renderer/dispatcher.cc b/extensions/renderer/dispatcher.cc
index 6522034fa41381c5a4565b6aa3e3c9455d79b313..f594b193cd1e7c84de0bf203d49e28f5a843bcae 100644
--- a/extensions/renderer/dispatcher.cc
+++ b/extensions/renderer/dispatcher.cc
@@ -574,9 +574,17 @@ std::vector<std::pair<std::string, int> > Dispatcher::GetJsResources() {
std::make_pair(mojo::kUnicodeModuleName, IDR_MOJO_UNICODE_JS));
resources.push_back(
std::make_pair(mojo::kValidatorModuleName, IDR_MOJO_VALIDATOR_JS));
+ resources.push_back(std::make_pair("async_waiter", IDR_ASYNC_WAITER_JS));
+ resources.push_back(std::make_pair("data_receiver", IDR_DATA_RECEIVER_JS));
+ resources.push_back(std::make_pair("data_sender", IDR_DATA_SENDER_JS));
resources.push_back(std::make_pair("keep_alive", IDR_KEEP_ALIVE_JS));
resources.push_back(std::make_pair("extensions/common/mojo/keep_alive.mojom",
IDR_KEEP_ALIVE_MOJOM_JS));
+ resources.push_back(std::make_pair("device/serial/data_stream.mojom",
+ IDR_DATA_STREAM_MOJOM_JS));
+ resources.push_back(
+ std::make_pair("device/serial/data_stream_serialization.mojom",
+ IDR_DATA_STREAM_SERIALIZATION_MOJOM_JS));
// Custom bindings.
resources.push_back(
@@ -601,6 +609,17 @@ std::vector<std::pair<std::string, int> > Dispatcher::GetJsResources() {
IDR_WEB_VIEW_REQUEST_CUSTOM_BINDINGS_JS));
resources.push_back(std::make_pair("binding", IDR_BINDING_JS));
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableMojoSerialService)) {
+ resources.push_back(
+ std::make_pair("serial", IDR_SERIAL_CUSTOM_BINDINGS_JS));
+ }
+ resources.push_back(std::make_pair("serial_service", IDR_SERIAL_SERVICE_JS));
+ resources.push_back(
+ std::make_pair("device/serial/serial.mojom", IDR_SERIAL_MOJOM_JS));
+ resources.push_back(std::make_pair("device/serial/serial_serialization.mojom",
+ IDR_SERIAL_SERIALIZATION_MOJOM_JS));
+
// Custom types sources.
resources.push_back(std::make_pair("StorageArea", IDR_STORAGE_AREA_JS));
« no previous file with comments | « extensions/renderer/api/serial/serial_api_unittest.cc ('k') | extensions/renderer/module_system.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698