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

Unified Diff: media/mojo/services/mojo_renderer_service.h

Issue 2539703002: media: Add |bad_message_cb_| to MojoRendererService (Closed)
Patch Set: add TODO and ref to bug Created 4 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 | « media/mojo/clients/mojo_renderer_unittest.cc ('k') | media/mojo/services/mojo_renderer_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/mojo/services/mojo_renderer_service.h
diff --git a/media/mojo/services/mojo_renderer_service.h b/media/mojo/services/mojo_renderer_service.h
index ea4e9377f0c1474646a463fa49e731fb2557d410..b52c632de79db1ce8c40b53747a19825d0283496 100644
--- a/media/mojo/services/mojo_renderer_service.h
+++ b/media/mojo/services/mojo_renderer_service.h
@@ -85,6 +85,10 @@ class MEDIA_MOJO_EXPORT MojoRendererService
std::unique_ptr<media::Renderer> renderer,
InitiateSurfaceRequestCB initiate_surface_request_cb);
+ void set_bad_message_cb(base::Closure bad_message_cb) {
+ bad_message_cb_ = bad_message_cb;
+ }
+
// RendererClient implementation.
void OnError(PipelineStatus status) final;
void OnEnded() final;
@@ -150,9 +154,10 @@ class MEDIA_MOJO_EXPORT MojoRendererService
// Returns the token to be used to fulfill the request.
InitiateSurfaceRequestCB initiate_surface_request_cb_;
- // WeakPtr to the binding that owns |this|.
- // Used to forcefully close the connection (which also safely destroy |this|).
- mojo::StrongBindingPtr<mojom::Renderer> binding_;
+ // Callback to be called when an invalid or unexpected message is received.
+ // TODO(tguilbert): Revisit how to do InitiateScopedSurfaceRequest() so that
+ // we can eliminate this callback. See http://crbug.com/669606
+ base::Closure bad_message_cb_;
base::WeakPtr<MojoRendererService> weak_this_;
base::WeakPtrFactory<MojoRendererService> weak_factory_;
« no previous file with comments | « media/mojo/clients/mojo_renderer_unittest.cc ('k') | media/mojo/services/mojo_renderer_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698