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

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

Issue 1681813002: Rename Connection::AddService/ConnectToService to Connection::AddInterface/GetInterface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@interface_binder
Patch Set: . Created 4 years, 10 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
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 20 matching lines...) Expand all
31 } 31 }
32 32
33 void MojoMediaApplication::Initialize(mojo::Shell* shell, 33 void MojoMediaApplication::Initialize(mojo::Shell* shell,
34 const std::string& url, 34 const std::string& url,
35 uint32_t id) { 35 uint32_t id) {
36 shell_ = shell; 36 shell_ = shell;
37 mojo_media_client_->Initialize(); 37 mojo_media_client_->Initialize();
38 } 38 }
39 39
40 bool MojoMediaApplication::AcceptConnection(mojo::Connection* connection) { 40 bool MojoMediaApplication::AcceptConnection(mojo::Connection* connection) {
41 connection->AddService<interfaces::ServiceFactory>(this); 41 connection->AddInterface<interfaces::ServiceFactory>(this);
42 return true; 42 return true;
43 } 43 }
44 44
45 void MojoMediaApplication::Create( 45 void MojoMediaApplication::Create(
46 mojo::Connection* connection, 46 mojo::Connection* connection,
47 mojo::InterfaceRequest<interfaces::ServiceFactory> request) { 47 mojo::InterfaceRequest<interfaces::ServiceFactory> request) {
48 // The created object is owned by the pipe. 48 // The created object is owned by the pipe.
49 new ServiceFactoryImpl(std::move(request), connection->GetServiceProvider(), 49 new ServiceFactoryImpl(std::move(request), connection->GetRemoteInterfaces(),
50 media_log_, shell_->CreateAppRefCount(), 50 media_log_, shell_->CreateAppRefCount(),
51 mojo_media_client_.get()); 51 mojo_media_client_.get());
52 } 52 }
53 53
54 } // namespace media 54 } // namespace media
OLDNEW
« no previous file with comments | « media/mojo/services/media_apptest.cc ('k') | mojo/public/cpp/bindings/tests/versioning_test_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698