OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "mojo/shell/public/cpp/lib/connector_impl.h" | 5 #include "mojo/shell/public/cpp/lib/connector_impl.h" |
6 | 6 |
7 #include "mojo/shell/public/cpp/lib/connection_impl.h" | 7 #include "mojo/shell/public/cpp/lib/connection_impl.h" |
8 | 8 |
9 namespace mojo { | 9 namespace mojo { |
10 | 10 |
11 Connector::ConnectParams::ConnectParams(const std::string& name) | 11 Connector::ConnectParams::ConnectParams(const std::string& name) |
12 : name_(name), | 12 : name_(name), |
13 user_id_(shell::mojom::Connector::kUserInherit) { | 13 user_id_(shell::mojom::kInheritUserID) { |
14 } | 14 } |
15 Connector::ConnectParams::~ConnectParams() {} | 15 Connector::ConnectParams::~ConnectParams() {} |
16 | 16 |
17 ConnectorImpl::ConnectorImpl(shell::mojom::ConnectorPtrInfo unbound_state) | 17 ConnectorImpl::ConnectorImpl(shell::mojom::ConnectorPtrInfo unbound_state) |
18 : unbound_state_(std::move(unbound_state)) {} | 18 : unbound_state_(std::move(unbound_state)) {} |
19 ConnectorImpl::ConnectorImpl(shell::mojom::ConnectorPtr connector) | 19 ConnectorImpl::ConnectorImpl(shell::mojom::ConnectorPtr connector) |
20 : connector_(std::move(connector)) { | 20 : connector_(std::move(connector)) { |
21 thread_checker_.reset(new base::ThreadChecker); | 21 thread_checker_.reset(new base::ThreadChecker); |
22 } | 22 } |
23 ConnectorImpl::~ConnectorImpl() {} | 23 ConnectorImpl::~ConnectorImpl() {} |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 } | 70 } |
71 | 71 |
72 scoped_ptr<Connector> ConnectorImpl::Clone() { | 72 scoped_ptr<Connector> ConnectorImpl::Clone() { |
73 shell::mojom::ConnectorPtr connector; | 73 shell::mojom::ConnectorPtr connector; |
74 connector_->Clone(GetProxy(&connector)); | 74 connector_->Clone(GetProxy(&connector)); |
75 return make_scoped_ptr( | 75 return make_scoped_ptr( |
76 new ConnectorImpl(connector.PassInterface())); | 76 new ConnectorImpl(connector.PassInterface())); |
77 } | 77 } |
78 | 78 |
79 } // namespace mojo | 79 } // namespace mojo |
OLD | NEW |