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

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

Issue 1770533002: Change userid from a uint32_t to a string guid (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@33connector
Patch Set: . Created 4 years, 9 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"
11 #include "media/mojo/services/service_factory_impl.h" 11 #include "media/mojo/services/service_factory_impl.h"
12 #include "mojo/shell/public/cpp/connection.h" 12 #include "mojo/shell/public/cpp/connection.h"
13 #include "mojo/shell/public/cpp/connector.h" 13 #include "mojo/shell/public/cpp/connector.h"
14 14
15 namespace media { 15 namespace media {
16 16
17 // TODO(xhwang): Hook up MediaLog when possible. 17 // TODO(xhwang): Hook up MediaLog when possible.
18 MojoMediaApplication::MojoMediaApplication( 18 MojoMediaApplication::MojoMediaApplication(
19 scoped_ptr<MojoMediaClient> mojo_media_client) 19 scoped_ptr<MojoMediaClient> mojo_media_client)
20 : mojo_media_client_(std::move(mojo_media_client)), 20 : mojo_media_client_(std::move(mojo_media_client)),
21 connector_(nullptr), 21 connector_(nullptr),
22 media_log_(new MediaLog()) { 22 media_log_(new MediaLog()) {
23 DCHECK(mojo_media_client_); 23 DCHECK(mojo_media_client_);
24 } 24 }
25 25
26 MojoMediaApplication::~MojoMediaApplication() {} 26 MojoMediaApplication::~MojoMediaApplication() {}
27 27
28 void MojoMediaApplication::Initialize(mojo::Connector* connector, 28 void MojoMediaApplication::Initialize(mojo::Connector* connector,
29 const std::string& /* url */, 29 const std::string& /* url */,
30 uint32_t /* id */, 30 const std::string& user_id,
31 uint32_t user_id) { 31 uint32_t /* id */) {
32 connector_ = connector; 32 connector_ = connector;
33 mojo_media_client_->Initialize(); 33 mojo_media_client_->Initialize();
34 } 34 }
35 35
36 bool MojoMediaApplication::AcceptConnection(mojo::Connection* connection) { 36 bool MojoMediaApplication::AcceptConnection(mojo::Connection* connection) {
37 connection->AddInterface<interfaces::ServiceFactory>(this); 37 connection->AddInterface<interfaces::ServiceFactory>(this);
38 return true; 38 return true;
39 } 39 }
40 40
41 void MojoMediaApplication::Create( 41 void MojoMediaApplication::Create(
42 mojo::Connection* connection, 42 mojo::Connection* connection,
43 mojo::InterfaceRequest<interfaces::ServiceFactory> request) { 43 mojo::InterfaceRequest<interfaces::ServiceFactory> request) {
44 // The created object is owned by the pipe. 44 // The created object is owned by the pipe.
45 new ServiceFactoryImpl(std::move(request), connection->GetRemoteInterfaces(), 45 new ServiceFactoryImpl(std::move(request), connection->GetRemoteInterfaces(),
46 media_log_, ref_factory_.CreateRef(), 46 media_log_, ref_factory_.CreateRef(),
47 mojo_media_client_.get()); 47 mojo_media_client_.get());
48 } 48 }
49 49
50 } // namespace media 50 } // namespace media
OLDNEW
« no previous file with comments | « media/mojo/services/mojo_media_application.h ('k') | mojo/services/network/network_service_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698