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

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

Issue 2075303002: [DO NOT COMMIT] Initial MediaPlayerRenderer plumbing and basic features (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 | « no previous file | content/renderer/render_frame_impl.cc » ('j') | content/renderer/render_frame_impl.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/render_frame_host_impl.cc
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
index 3855d7ee223446aa05e556519fe12961131e149a..9dc08e5da9591580d09a8fd5ff566b7b332a79bf 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -83,6 +83,9 @@
#include "content/public/common/url_constants.h"
#include "content/public/common/url_utils.h"
#include "device/vibration/vibration_manager_impl.h"
+// TODO(tguilbert): For reviewers: Is it ok to about include \\media files in
+// this file?
+#include "media/media_features.h"
xhwang 2016/06/22 17:39:02 this is fine. content/ already depends on media/
#include "ui/accessibility/ax_tree.h"
#include "ui/accessibility/ax_tree_update.h"
#include "ui/gfx/geometry/quad_f.h"
@@ -92,6 +95,10 @@
#include "content/browser/mojo/service_registrar_android.h"
#endif
+#if BUILDFLAG(FORCE_MOJO_MEDIA_PLAYER_RENDERER)
+#include "media/mojo/services/mojo_media_player_renderer_helper.h"
+#endif
+
#if defined(OS_MACOSX)
#include "content/browser/frame_host/popup_menu_helper_mac.h"
#endif
@@ -2051,6 +2058,15 @@ void RenderFrameHostImpl::RegisterMojoServices() {
}
#endif
+#if BUILDFLAG(FORCE_MOJO_MEDIA_PLAYER_RENDERER)
+ // This service creates a MojoRendererService, passing it a MediaPlayerRender.
+ // TODO(tguilbert): For reviewers: is there a need for disambiguating the
+ // mojom::Renderer service at a RenderFrameHost level?
+ GetServiceRegistry()->AddService<media::mojom::Renderer>(base::Bind(
+ &media::MojoMediaPlayerRendererHelper::CreateMediaPlayerRenderer,
xhwang 2016/06/22 17:39:02 You don't really need a class to do this. You can
+ base::Unretained(this)));
+#endif
+
GetContentClient()->browser()->RegisterRenderFrameMojoServices(
GetServiceRegistry(), this);
}
« no previous file with comments | « no previous file | content/renderer/render_frame_impl.cc » ('j') | content/renderer/render_frame_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698