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

Side by Side Diff: media/mojo/services/mojo_renderer_impl.h

Issue 1517753002: Create and use mojo::Binding on the same thread. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 unified diff | Download patch
« no previous file with comments | « no previous file | media/mojo/services/mojo_renderer_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MEDIA_MOJO_SERVICES_MOJO_RENDERER_IMPL_H_ 5 #ifndef MEDIA_MOJO_SERVICES_MOJO_RENDERER_IMPL_H_
6 #define MEDIA_MOJO_SERVICES_MOJO_RENDERER_IMPL_H_ 6 #define MEDIA_MOJO_SERVICES_MOJO_RENDERER_IMPL_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "media/base/renderer.h" 10 #include "media/base/renderer.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 59
60 private: 60 private:
61 // Called when |remote_renderer_| has finished initializing. 61 // Called when |remote_renderer_| has finished initializing.
62 void OnInitialized(bool success); 62 void OnInitialized(bool success);
63 63
64 // Task runner used to execute pipeline tasks. 64 // Task runner used to execute pipeline tasks.
65 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; 65 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
66 66
67 DemuxerStreamProvider* demuxer_stream_provider_; 67 DemuxerStreamProvider* demuxer_stream_provider_;
68 interfaces::RendererPtr remote_renderer_; 68 interfaces::RendererPtr remote_renderer_;
69 mojo::Binding<RendererClient> binding_; 69 scoped_ptr<mojo::Binding<RendererClient>> binding_;
70 70
71 // Callbacks passed to Initialize() that we forward messages from 71 // Callbacks passed to Initialize() that we forward messages from
72 // |remote_renderer_| through. 72 // |remote_renderer_| through.
73 PipelineStatusCB init_cb_; 73 PipelineStatusCB init_cb_;
74 base::Closure ended_cb_; 74 base::Closure ended_cb_;
75 PipelineStatusCB error_cb_; 75 PipelineStatusCB error_cb_;
76 BufferingStateCB buffering_state_cb_; 76 BufferingStateCB buffering_state_cb_;
77 77
78 // Lock used to serialize access for the following data members. 78 // Lock used to serialize access for the following data members.
79 mutable base::Lock lock_; 79 mutable base::Lock lock_;
80 80
81 base::TimeDelta time_; 81 base::TimeDelta time_;
82 // TODO(xhwang): It seems we don't need |max_time_| now. Drop it! 82 // TODO(xhwang): It seems we don't need |max_time_| now. Drop it!
83 base::TimeDelta max_time_; 83 base::TimeDelta max_time_;
84 84
85 base::WeakPtrFactory<MojoRendererImpl> weak_factory_; 85 base::WeakPtrFactory<MojoRendererImpl> weak_factory_;
86 86
87 DISALLOW_COPY_AND_ASSIGN(MojoRendererImpl); 87 DISALLOW_COPY_AND_ASSIGN(MojoRendererImpl);
88 }; 88 };
89 89
90 } // namespace media 90 } // namespace media
91 91
92 #endif // MEDIA_MOJO_SERVICES_MOJO_RENDERER_IMPL_H_ 92 #endif // MEDIA_MOJO_SERVICES_MOJO_RENDERER_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | media/mojo/services/mojo_renderer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698