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

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

Issue 882183002: Properly export Master/SlaveConnectionManager. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | mojo/edk/system/slave_connection_manager.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_MASTER_CONNECTION_MANAGER_H_ 5 #ifndef MOJO_EDK_SYSTEM_MASTER_CONNECTION_MANAGER_H_
6 #define MOJO_EDK_SYSTEM_MASTER_CONNECTION_MANAGER_H_ 6 #define MOJO_EDK_SYSTEM_MASTER_CONNECTION_MANAGER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/containers/hash_tables.h" 10 #include "base/containers/hash_tables.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/synchronization/lock.h" 13 #include "base/synchronization/lock.h"
14 #include "base/threading/thread.h" 14 #include "base/threading/thread.h"
15 #include "mojo/edk/embedder/scoped_platform_handle.h" 15 #include "mojo/edk/embedder/scoped_platform_handle.h"
16 #include "mojo/edk/system/connection_manager.h" 16 #include "mojo/edk/system/connection_manager.h"
17 #include "mojo/edk/system/system_impl_export.h"
17 18
18 namespace base { 19 namespace base {
19 class TaskRunner; 20 class TaskRunner;
20 class WaitableEvent; 21 class WaitableEvent;
21 } 22 }
22 23
23 namespace mojo { 24 namespace mojo {
24 25
25 namespace embedder { 26 namespace embedder {
26 class MasterProcessDelegate; 27 class MasterProcessDelegate;
27 class SlaveInfo; 28 class SlaveInfo;
28 } 29 }
29 30
30 namespace system { 31 namespace system {
31 32
32 // The |ConnectionManager| implementation for the master process. 33 // The |ConnectionManager| implementation for the master process.
33 // 34 //
34 // Objects of this class must be created, initialized (via |Init()|), shut down 35 // Objects of this class must be created, initialized (via |Init()|), shut down
35 // (via |Shutdown()|), and destroyed on the same thread (the "creation thread"). 36 // (via |Shutdown()|), and destroyed on the same thread (the "creation thread").
36 // Otherwise, its public methods are thread-safe (except that they may not be 37 // Otherwise, its public methods are thread-safe (except that they may not be
37 // called from its internal, private thread). 38 // called from its internal, private thread).
38 class MasterConnectionManager : public ConnectionManager { 39 class MOJO_SYSTEM_IMPL_EXPORT MasterConnectionManager
40 : public ConnectionManager {
39 public: 41 public:
40 // Note: None of the public methods may be called from |private_thread_|. 42 // Note: None of the public methods may be called from |private_thread_|.
41 43
42 MasterConnectionManager(); 44 MasterConnectionManager();
43 ~MasterConnectionManager() override; 45 ~MasterConnectionManager() override;
44 46
45 // No other methods may be called until after this has been called. 47 // No other methods may be called until after this has been called.
46 // |master_process_delegate| must stay alive at least until after |Shutdown()| 48 // |master_process_delegate| must stay alive at least until after |Shutdown()|
47 // has been called; its methods will be called on this object's creation 49 // has been called; its methods will be called on this object's creation
48 // thread. 50 // thread.
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 base::hash_map<ConnectionIdentifier, PendingConnectionInfo*> 132 base::hash_map<ConnectionIdentifier, PendingConnectionInfo*>
131 pending_connections_; // Owns its values. 133 pending_connections_; // Owns its values.
132 134
133 DISALLOW_COPY_AND_ASSIGN(MasterConnectionManager); 135 DISALLOW_COPY_AND_ASSIGN(MasterConnectionManager);
134 }; 136 };
135 137
136 } // namespace system 138 } // namespace system
137 } // namespace mojo 139 } // namespace mojo
138 140
139 #endif // MOJO_EDK_SYSTEM_MASTER_CONNECTION_MANAGER_H_ 141 #endif // MOJO_EDK_SYSTEM_MASTER_CONNECTION_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | mojo/edk/system/slave_connection_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698