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

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

Issue 2727123002: [Media Router] Custom Controls 1 - Add MediaStatus, MediaRouteController, and mojo interfaces (Closed)
Patch Set: Change comment Created 3 years, 9 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 | « chrome/test/BUILD.gn ('k') | extensions/renderer/resources/extensions_renderer_resources.grd » ('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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 132
133 namespace { 133 namespace {
134 134
135 static const int64_t kInitialExtensionIdleHandlerDelayMs = 5 * 1000; 135 static const int64_t kInitialExtensionIdleHandlerDelayMs = 5 * 1000;
136 static const int64_t kMaxExtensionIdleHandlerDelayMs = 5 * 60 * 1000; 136 static const int64_t kMaxExtensionIdleHandlerDelayMs = 5 * 60 * 1000;
137 static const char kOnSuspendEvent[] = "runtime.onSuspend"; 137 static const char kOnSuspendEvent[] = "runtime.onSuspend";
138 static const char kOnSuspendCanceledEvent[] = "runtime.onSuspendCanceled"; 138 static const char kOnSuspendCanceledEvent[] = "runtime.onSuspendCanceled";
139 139
140 void CrashOnException(const v8::TryCatch& trycatch) { 140 void CrashOnException(const v8::TryCatch& trycatch) {
141 NOTREACHED(); 141 NOTREACHED();
142 }; 142 }
143 143
144 // Calls a method |method_name| in a module |module_name| belonging to the 144 // Calls a method |method_name| in a module |module_name| belonging to the
145 // module system from |context|. Intended as a callback target from 145 // module system from |context|. Intended as a callback target from
146 // ScriptContextSet::ForEach. 146 // ScriptContextSet::ForEach.
147 void CallModuleMethod(const std::string& module_name, 147 void CallModuleMethod(const std::string& module_name,
148 const std::string& method_name, 148 const std::string& method_name,
149 const base::ListValue* args, 149 const base::ListValue* args,
150 ScriptContext* context) { 150 ScriptContext* context) {
151 v8::HandleScope handle_scope(context->isolate()); 151 v8::HandleScope handle_scope(context->isolate());
152 v8::Context::Scope context_scope(context->v8_context()); 152 v8::Context::Scope context_scope(context->v8_context());
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after
744 {"webViewRequest", IDR_WEB_VIEW_REQUEST_CUSTOM_BINDINGS_JS}, 744 {"webViewRequest", IDR_WEB_VIEW_REQUEST_CUSTOM_BINDINGS_JS},
745 {"binding", IDR_BINDING_JS}, 745 {"binding", IDR_BINDING_JS},
746 746
747 // Custom types sources. 747 // Custom types sources.
748 {"StorageArea", IDR_STORAGE_AREA_JS}, 748 {"StorageArea", IDR_STORAGE_AREA_JS},
749 749
750 // Platform app sources that are not API-specific.. 750 // Platform app sources that are not API-specific..
751 {"platformApp", IDR_PLATFORM_APP_JS}, 751 {"platformApp", IDR_PLATFORM_APP_JS},
752 752
753 #if defined(ENABLE_MEDIA_ROUTER) 753 #if defined(ENABLE_MEDIA_ROUTER)
754 {"chrome/browser/media/router/mojo/media_controller.mojom",
Nico 2017/03/23 18:36:49 This adds many more dependencies from extensions/
imcheng 2017/03/23 19:03:16 These dependencies need to exist for the Media Rou
755 IDR_MEDIA_CONTROLLER_MOJOM_JS},
754 {"chrome/browser/media/router/mojo/media_router.mojom", 756 {"chrome/browser/media/router/mojo/media_router.mojom",
755 IDR_MEDIA_ROUTER_MOJOM_JS}, 757 IDR_MEDIA_ROUTER_MOJOM_JS},
758 {"chrome/browser/media/router/mojo/media_status.mojom",
759 IDR_MEDIA_STATUS_MOJOM_JS},
756 {"media_router_bindings", IDR_MEDIA_ROUTER_BINDINGS_JS}, 760 {"media_router_bindings", IDR_MEDIA_ROUTER_BINDINGS_JS},
757 {"mojo/common/time.mojom", IDR_MOJO_TIME_MOJOM_JS}, 761 {"mojo/common/time.mojom", IDR_MOJO_TIME_MOJOM_JS},
758 {"net/interfaces/ip_address.mojom", IDR_MOJO_IP_ADDRESS_MOJOM_JS}, 762 {"net/interfaces/ip_address.mojom", IDR_MOJO_IP_ADDRESS_MOJOM_JS},
759 {"url/mojo/origin.mojom", IDR_ORIGIN_MOJOM_JS}, 763 {"url/mojo/origin.mojom", IDR_ORIGIN_MOJOM_JS},
760 {"url/mojo/url.mojom", IDR_MOJO_URL_MOJOM_JS}, 764 {"url/mojo/url.mojom", IDR_MOJO_URL_MOJOM_JS},
761 #endif // defined(ENABLE_MEDIA_ROUTER) 765 #endif // defined(ENABLE_MEDIA_ROUTER)
762 }; 766 };
763 767
764 if (base::FeatureList::IsEnabled(::features::kGuestViewCrossProcessFrames)) { 768 if (base::FeatureList::IsEnabled(::features::kGuestViewCrossProcessFrames)) {
765 resources.emplace_back("guestViewIframe", IDR_GUEST_VIEW_IFRAME_JS); 769 resources.emplace_back("guestViewIframe", IDR_GUEST_VIEW_IFRAME_JS);
(...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after
1419 // The "guestViewDeny" module must always be loaded last. It registers 1423 // The "guestViewDeny" module must always be loaded last. It registers
1420 // error-providing custom elements for the GuestView types that are not 1424 // error-providing custom elements for the GuestView types that are not
1421 // available, and thus all of those types must have been checked and loaded 1425 // available, and thus all of those types must have been checked and loaded
1422 // (or not loaded) beforehand. 1426 // (or not loaded) beforehand.
1423 if (context_type == Feature::BLESSED_EXTENSION_CONTEXT) { 1427 if (context_type == Feature::BLESSED_EXTENSION_CONTEXT) {
1424 module_system->Require("guestViewDeny"); 1428 module_system->Require("guestViewDeny");
1425 } 1429 }
1426 } 1430 }
1427 1431
1428 } // namespace extensions 1432 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/test/BUILD.gn ('k') | extensions/renderer/resources/extensions_renderer_resources.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698