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

Unified Diff: mojo/services/html_viewer/html_document_view.cc

Issue 567803002: Hook WebMediaPlayerImpl up to Mojo's HTMLDocumentView. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address CR comment Created 6 years, 3 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 | « mojo/services/html_viewer/html_document_view.h ('k') | mojo/services/html_viewer/html_viewer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/html_viewer/html_document_view.cc
diff --git a/mojo/services/html_viewer/html_document_view.cc b/mojo/services/html_viewer/html_document_view.cc
index 8bdd50108375be9db6b1248243177ded2841c2a7..d1ff3fe426ca81382009aad2d87067a3cfa7b504 100644
--- a/mojo/services/html_viewer/html_document_view.cc
+++ b/mojo/services/html_viewer/html_document_view.cc
@@ -17,6 +17,7 @@
#include "mojo/services/html_viewer/blink_input_events_type_converters.h"
#include "mojo/services/html_viewer/blink_url_request_type_converters.h"
#include "mojo/services/html_viewer/weblayertreeview_impl.h"
+#include "mojo/services/html_viewer/webmediaplayer_factory.h"
#include "mojo/services/html_viewer/webstoragenamespace_impl.h"
#include "mojo/services/html_viewer/weburlloader_impl.h"
#include "mojo/services/public/cpp/view_manager/view.h"
@@ -87,12 +88,14 @@ HTMLDocumentView::HTMLDocumentView(
URLResponsePtr response,
InterfaceRequest<ServiceProvider> service_provider_request,
Shell* shell,
- scoped_refptr<base::MessageLoopProxy> compositor_thread)
+ scoped_refptr<base::MessageLoopProxy> compositor_thread,
+ WebMediaPlayerFactory* web_media_player_factory)
: shell_(shell),
web_view_(NULL),
root_(NULL),
view_manager_client_factory_(shell, this),
compositor_thread_(compositor_thread),
+ web_media_player_factory_(web_media_player_factory),
weak_factory_(this) {
ServiceProviderImpl* exported_services = new ServiceProviderImpl();
exported_services->AddService(&view_manager_client_factory_);
@@ -170,6 +173,13 @@ blink::WebLayerTreeView* HTMLDocumentView::layerTreeView() {
return web_layer_tree_view_impl_.get();
}
+blink::WebMediaPlayer* HTMLDocumentView::createMediaPlayer(
+ blink::WebLocalFrame* frame,
+ const blink::WebURL& url,
+ blink::WebMediaPlayerClient* client) {
+ return web_media_player_factory_->CreateMediaPlayer(frame, url, client);
+}
+
blink::WebFrame* HTMLDocumentView::createChildFrame(
blink::WebLocalFrame* parent,
const blink::WebString& frameName) {
« no previous file with comments | « mojo/services/html_viewer/html_document_view.h ('k') | mojo/services/html_viewer/html_viewer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698