Chromium Code Reviews| 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 "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/debug/alias.h" | 10 #include "base/debug/alias.h" |
| (...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 584 std::make_pair("device/serial/serial.mojom", IDR_SERIAL_MOJOM_JS)); | 584 std::make_pair("device/serial/serial.mojom", IDR_SERIAL_MOJOM_JS)); |
| 585 resources.push_back(std::make_pair("device/serial/serial_serialization.mojom", | 585 resources.push_back(std::make_pair("device/serial/serial_serialization.mojom", |
| 586 IDR_SERIAL_SERIALIZATION_MOJOM_JS)); | 586 IDR_SERIAL_SERIALIZATION_MOJOM_JS)); |
| 587 | 587 |
| 588 // Custom types sources. | 588 // Custom types sources. |
| 589 resources.push_back(std::make_pair("StorageArea", IDR_STORAGE_AREA_JS)); | 589 resources.push_back(std::make_pair("StorageArea", IDR_STORAGE_AREA_JS)); |
| 590 | 590 |
| 591 // Platform app sources that are not API-specific.. | 591 // Platform app sources that are not API-specific.. |
| 592 resources.push_back(std::make_pair("platformApp", IDR_PLATFORM_APP_JS)); | 592 resources.push_back(std::make_pair("platformApp", IDR_PLATFORM_APP_JS)); |
| 593 | 593 |
| 594 #if defined(ENABLE_MEDIA_ROUTER) | |
| 595 resources.push_back( | |
| 596 std::make_pair("chrome/browser/media/router/media_router.mojom", | |
|
Nico
2017/03/22 21:49:34
This looks like a way worse dependency cycle, come
| |
| 597 IDR_MEDIA_ROUTER_MOJOM_JS)); | |
| 598 resources.push_back( | |
| 599 std::make_pair("media_router_bindings", IDR_MEDIA_ROUTER_BINDINGS_JS)); | |
| 600 #endif // defined(ENABLE_MEDIA_ROUTER) | |
| 601 | |
| 594 return resources; | 602 return resources; |
| 595 } | 603 } |
| 596 | 604 |
| 597 // NOTE: please use the naming convention "foo_natives" for these. | 605 // NOTE: please use the naming convention "foo_natives" for these. |
| 598 // static | 606 // static |
| 599 void Dispatcher::RegisterNativeHandlers(ModuleSystem* module_system, | 607 void Dispatcher::RegisterNativeHandlers(ModuleSystem* module_system, |
| 600 ScriptContext* context, | 608 ScriptContext* context, |
| 601 Dispatcher* dispatcher, | 609 Dispatcher* dispatcher, |
| 602 RequestSender* request_sender, | 610 RequestSender* request_sender, |
| 603 V8SchemaRegistry* v8_schema_registry) { | 611 V8SchemaRegistry* v8_schema_registry) { |
| (...skipping 806 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1410 // The "guestViewDeny" module must always be loaded last. It registers | 1418 // The "guestViewDeny" module must always be loaded last. It registers |
| 1411 // error-providing custom elements for the GuestView types that are not | 1419 // error-providing custom elements for the GuestView types that are not |
| 1412 // available, and thus all of those types must have been checked and loaded | 1420 // available, and thus all of those types must have been checked and loaded |
| 1413 // (or not loaded) beforehand. | 1421 // (or not loaded) beforehand. |
| 1414 if (context_type == Feature::BLESSED_EXTENSION_CONTEXT) { | 1422 if (context_type == Feature::BLESSED_EXTENSION_CONTEXT) { |
| 1415 module_system->Require("guestViewDeny"); | 1423 module_system->Require("guestViewDeny"); |
| 1416 } | 1424 } |
| 1417 } | 1425 } |
| 1418 | 1426 |
| 1419 } // namespace extensions | 1427 } // namespace extensions |
| OLD | NEW |