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

Side by Side Diff: mojo/edk/system/endpoint_relayer.h

Issue 795593004: Update mojo sdk to rev cc531b32182099a5a034a99daff35ed5d38a61c8 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More workarounds for MSVC Created 5 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 unified diff | Download patch
« no previous file with comments | « mojo/edk/system/core_unittest.cc ('k') | mojo/edk/system/incoming_endpoint.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef MOJO_EDK_SYSTEM_ENDPOINT_RELAYER_H_ 5 #ifndef MOJO_EDK_SYSTEM_ENDPOINT_RELAYER_H_
6 #define MOJO_EDK_SYSTEM_ENDPOINT_RELAYER_H_ 6 #define MOJO_EDK_SYSTEM_ENDPOINT_RELAYER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/synchronization/lock.h" 10 #include "base/synchronization/lock.h"
(...skipping 15 matching lines...) Expand all
26 static unsigned GetPeerPort(unsigned port); 26 static unsigned GetPeerPort(unsigned port);
27 27
28 // Initialize this object. This must be called before any other method. 28 // Initialize this object. This must be called before any other method.
29 void Init(ChannelEndpoint* endpoint0, ChannelEndpoint* endpoint1); 29 void Init(ChannelEndpoint* endpoint0, ChannelEndpoint* endpoint1);
30 30
31 // |ChannelEndpointClient| methods: 31 // |ChannelEndpointClient| methods:
32 bool OnReadMessage(unsigned port, MessageInTransit* message) override; 32 bool OnReadMessage(unsigned port, MessageInTransit* message) override;
33 void OnDetachFromChannel(unsigned port) override; 33 void OnDetachFromChannel(unsigned port) override;
34 34
35 private: 35 private:
36 virtual ~EndpointRelayer(); 36 ~EndpointRelayer() override;
37 37
38 // TODO(vtl): We could probably get away without the lock if we had a 38 // TODO(vtl): We could probably get away without the lock if we had a
39 // thread-safe |scoped_refptr|. 39 // thread-safe |scoped_refptr|.
40 base::Lock lock_; // Protects the following members. 40 base::Lock lock_; // Protects the following members.
41 scoped_refptr<ChannelEndpoint> endpoints_[2]; 41 scoped_refptr<ChannelEndpoint> endpoints_[2];
42 42
43 DISALLOW_COPY_AND_ASSIGN(EndpointRelayer); 43 DISALLOW_COPY_AND_ASSIGN(EndpointRelayer);
44 }; 44 };
45 45
46 } // namespace system 46 } // namespace system
47 } // namespace mojo 47 } // namespace mojo
48 48
49 #endif // MOJO_EDK_SYSTEM_ENDPOINT_RELAYER_H_ 49 #endif // MOJO_EDK_SYSTEM_ENDPOINT_RELAYER_H_
OLDNEW
« no previous file with comments | « mojo/edk/system/core_unittest.cc ('k') | mojo/edk/system/incoming_endpoint.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698