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

Unified Diff: mojo/services/html_viewer/html_viewer.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.cc ('k') | mojo/services/html_viewer/webmediaplayer_factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/html_viewer/html_viewer.cc
diff --git a/mojo/services/html_viewer/html_viewer.cc b/mojo/services/html_viewer/html_viewer.cc
index 2a8e766679b01c982763bd01230c41718c61f38a..4bd3295715b9661aaa96db21c54fcc8213f2dfaf 100644
--- a/mojo/services/html_viewer/html_viewer.cc
+++ b/mojo/services/html_viewer/html_viewer.cc
@@ -12,6 +12,7 @@
#include "mojo/public/cpp/application/interface_factory_impl.h"
#include "mojo/services/html_viewer/blink_platform_impl.h"
#include "mojo/services/html_viewer/html_document_view.h"
+#include "mojo/services/html_viewer/webmediaplayer_factory.h"
#include "mojo/services/public/interfaces/content_handler/content_handler.mojom.h"
#include "third_party/WebKit/public/web/WebKit.h"
@@ -22,8 +23,11 @@ class HTMLViewer;
class ContentHandlerImpl : public InterfaceImpl<ContentHandler> {
public:
ContentHandlerImpl(Shell* shell,
- scoped_refptr<base::MessageLoopProxy> compositor_thread)
- : shell_(shell), compositor_thread_(compositor_thread) {}
+ scoped_refptr<base::MessageLoopProxy> compositor_thread,
+ WebMediaPlayerFactory* web_media_player_factory)
+ : shell_(shell),
+ compositor_thread_(compositor_thread),
+ web_media_player_factory_(web_media_player_factory) {}
virtual ~ContentHandlerImpl() {}
private:
@@ -35,11 +39,13 @@ class ContentHandlerImpl : public InterfaceImpl<ContentHandler> {
new HTMLDocumentView(response.Pass(),
service_provider_request.Pass(),
shell_,
- compositor_thread_);
+ compositor_thread_,
+ web_media_player_factory_);
}
Shell* shell_;
scoped_refptr<base::MessageLoopProxy> compositor_thread_;
+ WebMediaPlayerFactory* web_media_player_factory_;
DISALLOW_COPY_AND_ASSIGN(ContentHandlerImpl);
};
@@ -58,6 +64,8 @@ class HTMLViewer : public ApplicationDelegate,
blink_platform_impl_.reset(new BlinkPlatformImpl(app));
blink::initialize(blink_platform_impl_.get());
compositor_thread_.Start();
+ web_media_player_factory_.reset(new WebMediaPlayerFactory(
+ compositor_thread_.message_loop_proxy()));
}
virtual bool ConfigureIncomingConnection(ApplicationConnection* connection)
@@ -70,13 +78,15 @@ class HTMLViewer : public ApplicationDelegate,
virtual void Create(ApplicationConnection* connection,
InterfaceRequest<ContentHandler> request) OVERRIDE {
BindToRequest(
- new ContentHandlerImpl(shell_, compositor_thread_.message_loop_proxy()),
+ new ContentHandlerImpl(shell_, compositor_thread_.message_loop_proxy(),
+ web_media_player_factory_.get()),
&request);
}
scoped_ptr<BlinkPlatformImpl> blink_platform_impl_;
Shell* shell_;
base::Thread compositor_thread_;
+ scoped_ptr<WebMediaPlayerFactory> web_media_player_factory_;
DISALLOW_COPY_AND_ASSIGN(HTMLViewer);
};
« no previous file with comments | « mojo/services/html_viewer/html_document_view.cc ('k') | mojo/services/html_viewer/webmediaplayer_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698