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

Unified 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, 11 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 side-by-side diff with in-line comments
Download patch
Index: mojo/edk/system/ports/port_ref.h
diff --git a/mojo/edk/system/ports/port_ref.h b/mojo/edk/system/ports/port_ref.h
new file mode 100644
index 0000000000000000000000000000000000000000..9af4a8de1d710bb9423bc4eb86d17e8715b75807
--- /dev/null
+++ b/mojo/edk/system/ports/port_ref.h
@@ -0,0 +1,41 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef MOJO_EDK_SYSTEM_PORTS_PORT_REF_H_
+#define MOJO_EDK_SYSTEM_PORTS_PORT_REF_H_
+
+#include "base/memory/ref_counted.h"
+#include "mojo/edk/system/ports/name.h"
+
+namespace mojo {
+namespace edk {
+namespace ports {
+
+class Port;
+class Node;
+
+class PortRef {
+ public:
+ ~PortRef();
+ PortRef();
+ PortRef(const PortName& name, const scoped_refptr<Port>& port);
+
+ PortRef(const PortRef& other);
+ PortRef& operator=(const PortRef& other);
+
+ const PortName& name() const { return name_; }
+
+ private:
+ friend class Node;
+ Port* port() const { return port_.get(); }
+
+ PortName name_;
+ scoped_refptr<Port> port_;
+};
+
+} // namespace ports
+} // namespace edk
+} // namespace mojo
+
+#endif // MOJO_EDK_SYSTEM_PORTS_PORT_REF_H_

Powered by Google App Engine
This is Rietveld 408576698