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

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

Issue 567803002: Hook WebMediaPlayerImpl up to Mojo's HTMLDocumentView. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move factory ownership to HTMLViewer. 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
Index: mojo/services/html_viewer/html_document_view.h
diff --git a/mojo/services/html_viewer/html_document_view.h b/mojo/services/html_viewer/html_document_view.h
index 3efd707d19dda37ea2e1ad719741a82a6cf255fe..5df5869a4090099cb71a9a07da36daf489d445c1 100644
--- a/mojo/services/html_viewer/html_document_view.h
+++ b/mojo/services/html_viewer/html_document_view.h
@@ -19,6 +19,7 @@
namespace mojo {
+class WebMediaPlayerFactory;
class ViewManager;
class View;
@@ -38,7 +39,8 @@ class HTMLDocumentView : public blink::WebViewClient,
// |shell| is the Shell connection for this mojo::Application.
HTMLDocumentView(URLResponsePtr response,
InterfaceRequest<ServiceProvider> service_provider_request,
- Shell* shell);
+ Shell* shell,
+ WebMediaPlayerFactory* web_media_player_factory);
virtual ~HTMLDocumentView();
private:
@@ -50,6 +52,10 @@ class HTMLDocumentView : public blink::WebViewClient,
virtual bool allowsBrokenNullLayerTreeView() const;
// WebFrameClient methods:
+ virtual blink::WebMediaPlayer* createMediaPlayer(
+ blink::WebLocalFrame* frame,
+ const blink::WebURL& url,
+ blink::WebMediaPlayerClient* client);
virtual blink::WebFrame* createChildFrame(blink::WebLocalFrame* parent,
const blink::WebString& frameName);
virtual void frameDetached(blink::WebFrame*);
@@ -95,6 +101,8 @@ class HTMLDocumentView : public blink::WebViewClient,
ViewManagerClientFactory view_manager_client_factory_;
bool repaint_pending_;
+ WebMediaPlayerFactory* web_media_player_factory_;
+
base::WeakPtrFactory<HTMLDocumentView> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(HTMLDocumentView);
};

Powered by Google App Engine
This is Rietveld 408576698