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

Side by Side Diff: mojo/edk/system/ports/port_ref.h

Issue 1585493002: [mojo] Ports EDK (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef MOJO_EDK_SYSTEM_PORTS_PORT_REF_H_
6 #define MOJO_EDK_SYSTEM_PORTS_PORT_REF_H_
7
8 #include "base/memory/ref_counted.h"
9 #include "mojo/edk/system/ports/name.h"
10
11 namespace mojo {
12 namespace edk {
13 namespace ports {
14
15 class Port;
16 class Node;
17
18 class PortRef {
19 public:
20 ~PortRef();
21 PortRef();
22 PortRef(const PortName& name, const scoped_refptr<Port>& port);
23
24 PortRef(const PortRef& other);
25 PortRef& operator=(const PortRef& other);
26
27 const PortName& name() const { return name_; }
28
29 private:
30 friend class Node;
31 Port* port() const { return port_.get(); }
32
33 PortName name_;
34 scoped_refptr<Port> port_;
35 };
36
37 } // namespace ports
38 } // namespace edk
39 } // namespace mojo
40
41 #endif // MOJO_EDK_SYSTEM_PORTS_PORT_REF_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698