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

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

Issue 2215133002: Change signature of OnConnect (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cleanup
Patch Set: . Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « media/mojo/services/mojo_media_application.h ('k') | services/catalog/catalog.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_media_application.h" 5 #include "media/mojo/services/mojo_media_application.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "media/base/media_log.h" 9 #include "media/base/media_log.h"
10 #include "media/mojo/services/mojo_media_client.h" 10 #include "media/mojo/services/mojo_media_client.h"
(...skipping 12 matching lines...) Expand all
23 ref_factory_(quit_closure) { 23 ref_factory_(quit_closure) {
24 DCHECK(mojo_media_client_); 24 DCHECK(mojo_media_client_);
25 } 25 }
26 26
27 MojoMediaApplication::~MojoMediaApplication() {} 27 MojoMediaApplication::~MojoMediaApplication() {}
28 28
29 void MojoMediaApplication::OnStart(const shell::Identity& identity) { 29 void MojoMediaApplication::OnStart(const shell::Identity& identity) {
30 mojo_media_client_->Initialize(); 30 mojo_media_client_->Initialize();
31 } 31 }
32 32
33 bool MojoMediaApplication::OnConnect(shell::Connection* connection) { 33 bool MojoMediaApplication::OnConnect(const shell::Identity& remote_identity,
34 connection->AddInterface<mojom::MediaService>(this); 34 shell::InterfaceRegistry* registry) {
35 registry->AddInterface<mojom::MediaService>(this);
35 return true; 36 return true;
36 } 37 }
37 38
38 bool MojoMediaApplication::OnStop() { 39 bool MojoMediaApplication::OnStop() {
39 mojo_media_client_->WillQuit(); 40 mojo_media_client_->WillQuit();
40 return true; 41 return true;
41 } 42 }
42 43
43 void MojoMediaApplication::Create(const shell::Identity& remote_identity, 44 void MojoMediaApplication::Create(const shell::Identity& remote_identity,
44 mojom::MediaServiceRequest request) { 45 mojom::MediaServiceRequest request) {
45 bindings_.AddBinding(this, std::move(request)); 46 bindings_.AddBinding(this, std::move(request));
46 } 47 }
47 48
48 void MojoMediaApplication::CreateServiceFactory( 49 void MojoMediaApplication::CreateServiceFactory(
49 mojom::ServiceFactoryRequest request, 50 mojom::ServiceFactoryRequest request,
50 shell::mojom::InterfaceProviderPtr remote_interfaces) { 51 shell::mojom::InterfaceProviderPtr remote_interfaces) {
51 // The created object is owned by the pipe. 52 // The created object is owned by the pipe.
52 new ServiceFactoryImpl(std::move(request), std::move(remote_interfaces), 53 new ServiceFactoryImpl(std::move(request), std::move(remote_interfaces),
53 media_log_, ref_factory_.CreateRef(), 54 media_log_, ref_factory_.CreateRef(),
54 mojo_media_client_.get()); 55 mojo_media_client_.get());
55 } 56 }
56 57
57 } // namespace media 58 } // namespace media
OLDNEW
« no previous file with comments | « media/mojo/services/mojo_media_application.h ('k') | services/catalog/catalog.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698