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

Side by Side Diff: media/mojo/services/mojo_renderer_service.cc

Issue 1541943002: Delete media::Interfaces::ServiceFactory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add service bundle 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 | « media/mojo/services/mojo_renderer_service.h ('k') | media/mojo/services/service_factory_impl.h » ('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 #include "media/mojo/services/mojo_renderer_service.h" 5 #include "media/mojo/services/mojo_renderer_service.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "media/base/renderer.h" 8 #include "media/base/renderer.h"
9 #include "media/mojo/services/demuxer_stream_provider_shim.h" 9 #include "media/mojo/services/demuxer_stream_provider_shim.h"
10 10
11 namespace media { 11 namespace media {
12 12
13 // Time interval to update media time. 13 // Time interval to update media time.
14 const int kTimeUpdateIntervalMs = 50; 14 const int kTimeUpdateIntervalMs = 50;
15 15
16 MojoRendererService::MojoRendererService( 16 MojoRendererService::MojoRendererService(
17 base::WeakPtr<CdmContextProvider> cdm_context_provider, 17 base::WeakPtr<CdmContextProvider> cdm_context_provider,
18 scoped_ptr<media::Renderer> renderer, 18 scoped_ptr<media::Renderer> renderer)
19 mojo::InterfaceRequest<interfaces::Renderer> request) 19 : cdm_context_provider_(cdm_context_provider),
20 : binding_(this, request.Pass()),
21 cdm_context_provider_(cdm_context_provider),
22 renderer_(renderer.Pass()), 20 renderer_(renderer.Pass()),
23 state_(STATE_UNINITIALIZED), 21 state_(STATE_UNINITIALIZED),
24 last_media_time_usec_(0), 22 last_media_time_usec_(0),
25 weak_factory_(this) { 23 weak_factory_(this) {
26 weak_this_ = weak_factory_.GetWeakPtr(); 24 weak_this_ = weak_factory_.GetWeakPtr();
27 DVLOG(1) << __FUNCTION__; 25 DVLOG(1) << __FUNCTION__;
28 } 26 }
29 27
30 MojoRendererService::~MojoRendererService() { 28 MojoRendererService::~MojoRendererService() {
31 } 29 }
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 } 174 }
177 175
178 void MojoRendererService::OnCdmAttached( 176 void MojoRendererService::OnCdmAttached(
179 const mojo::Callback<void(bool)>& callback, 177 const mojo::Callback<void(bool)>& callback,
180 bool success) { 178 bool success) {
181 DVLOG(1) << __FUNCTION__ << "(" << success << ")"; 179 DVLOG(1) << __FUNCTION__ << "(" << success << ")";
182 callback.Run(success); 180 callback.Run(success);
183 } 181 }
184 182
185 } // namespace media 183 } // namespace media
OLDNEW
« no previous file with comments | « media/mojo/services/mojo_renderer_service.h ('k') | media/mojo/services/service_factory_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698