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

Unified Diff: content/renderer/media/media_interface_provider.cc

Issue 2166953006: Eliminate FrameMojoShell. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/media/media_interface_provider.h ('k') | content/renderer/render_frame_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/media_interface_provider.cc
diff --git a/content/renderer/media/media_interface_provider.cc b/content/renderer/media/media_interface_provider.cc
index 51ac79bd52d372641addbb530356bb50256f0893..34ea4bdad16da5ce4146d17cb643ae967c16bf5c 100644
--- a/content/renderer/media/media_interface_provider.cc
+++ b/content/renderer/media/media_interface_provider.cc
@@ -10,14 +10,13 @@
#include "media/mojo/interfaces/content_decryption_module.mojom.h"
#include "media/mojo/interfaces/renderer.mojom.h"
#include "mojo/public/cpp/bindings/interface_request.h"
-#include "services/shell/public/cpp/connect.h"
+#include "services/shell/public/cpp/interface_provider.h"
namespace content {
MediaInterfaceProvider::MediaInterfaceProvider(
- const ConnectToApplicationCB& connect_to_app_cb)
- : connect_to_app_cb_(connect_to_app_cb) {
- DCHECK(!connect_to_app_cb_.is_null());
+ shell::InterfaceProvider* remote_interfaces)
+ : remote_interfaces_(remote_interfaces) {
}
MediaInterfaceProvider::~MediaInterfaceProvider() {
@@ -53,9 +52,7 @@ media::mojom::ServiceFactory* MediaInterfaceProvider::GetMediaServiceFactory() {
DCHECK(thread_checker_.CalledOnValidThread());
if (!media_service_factory_) {
- shell::mojom::InterfaceProviderPtr interface_provider =
- connect_to_app_cb_.Run(GURL("mojo:media"));
- shell::GetInterface(interface_provider.get(), &media_service_factory_);
+ remote_interfaces_->GetInterface(&media_service_factory_);
media_service_factory_.set_connection_error_handler(base::Bind(
&MediaInterfaceProvider::OnConnectionError, base::Unretained(this)));
}
« no previous file with comments | « content/renderer/media/media_interface_provider.h ('k') | content/renderer/render_frame_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698