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

Unified Diff: content/browser/frame_host/frame_mojo_shell.cc

Issue 1466633002: media: Add ProvisionFetcher mojo interface and implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix std::move use Created 5 years, 1 month 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 | « no previous file | content/browser/media/android/provision_fetcher_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/frame_mojo_shell.cc
diff --git a/content/browser/frame_host/frame_mojo_shell.cc b/content/browser/frame_host/frame_mojo_shell.cc
index 3176fc01b675e821026333aea54826fdde4ed555..4f4a113220a72aa419120411b25f6e6c2d932dcd 100644
--- a/content/browser/frame_host/frame_mojo_shell.cc
+++ b/content/browser/frame_host/frame_mojo_shell.cc
@@ -16,6 +16,10 @@
#include "content/public/common/content_client.h"
#include "mojo/public/cpp/system/message_pipe.h"
+#if defined(OS_ANDROID) && defined(ENABLE_MOJO_MEDIA)
+#include "content/browser/media/android/provision_fetcher_impl.h"
+#endif
+
namespace content {
namespace {
@@ -41,6 +45,14 @@ class ServiceRegistryWrapper : public mojo::ServiceProvider {
DISALLOW_COPY_AND_ASSIGN(ServiceRegistryWrapper);
};
+void RegisterFrameMojoShellServices(ServiceRegistry* registry,
+ RenderFrameHost* render_frame_host) {
+#if defined(OS_ANDROID) && defined(ENABLE_MOJO_MEDIA)
+ registry->AddService(
+ base::Bind(&ProvisionFetcherImpl::Create, render_frame_host));
+#endif
+}
+
} // namespace
FrameMojoShell::FrameMojoShell(RenderFrameHost* frame_host)
@@ -84,6 +96,10 @@ void FrameMojoShell::QuitApplication() {
mojo::ServiceProvider* FrameMojoShell::GetServiceProvider() {
if (!service_provider_) {
scoped_ptr<ServiceRegistryImpl> registry(new ServiceRegistryImpl());
+ // TODO(rockot/xhwang): Currently all applications connected share the same
+ // set of services registered in the |registry|. We may want to provide
+ // different services for different apps for better isolation.
+ RegisterFrameMojoShellServices(registry.get(), frame_host_);
GetContentClient()->browser()->RegisterFrameMojoShellServices(
registry.get(), frame_host_);
service_provider_.reset(new ServiceRegistryWrapper(std::move(registry)));
« no previous file with comments | « no previous file | content/browser/media/android/provision_fetcher_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698