OLD | NEW |
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_EMBEDDER_MASTER_PROCESS_DELEGATE_H_ | 5 #ifndef MOJO_EDK_EMBEDDER_MASTER_PROCESS_DELEGATE_H_ |
6 #define MOJO_EDK_EMBEDDER_MASTER_PROCESS_DELEGATE_H_ | 6 #define MOJO_EDK_EMBEDDER_MASTER_PROCESS_DELEGATE_H_ |
7 | 7 |
8 #include "mojo/edk/embedder/process_delegate.h" | 8 #include "mojo/edk/embedder/process_delegate.h" |
9 #include "mojo/edk/embedder/slave_info.h" | 9 #include "mojo/edk/embedder/slave_info.h" |
10 #include "mojo/edk/system/system_impl_export.h" | |
11 #include "mojo/public/cpp/system/macros.h" | 10 #include "mojo/public/cpp/system/macros.h" |
12 | 11 |
13 namespace mojo { | 12 namespace mojo { |
14 namespace embedder { | 13 namespace embedder { |
15 | 14 |
16 // An interface for the master process delegate (which lives in the master | 15 // An interface for the master process delegate (which lives in the master |
17 // process). | 16 // process). |
18 class MOJO_SYSTEM_IMPL_EXPORT MasterProcessDelegate : public ProcessDelegate { | 17 class MasterProcessDelegate : public ProcessDelegate { |
19 public: | 18 public: |
20 ProcessType GetType() const override; | 19 ProcessType GetType() const override; |
21 | 20 |
22 // Called when contact with the slave process specified by |slave_info| has | 21 // Called when contact with the slave process specified by |slave_info| has |
23 // been lost. | 22 // been lost. |
24 // TODO(vtl): Obviously, there needs to be a suitable embedder API for | 23 // TODO(vtl): Obviously, there needs to be a suitable embedder API for |
25 // connecting to a process. What will it be? Mention that here once it exists. | 24 // connecting to a process. What will it be? Mention that here once it exists. |
26 virtual void OnSlaveDisconnect(SlaveInfo slave_info) = 0; | 25 virtual void OnSlaveDisconnect(SlaveInfo slave_info) = 0; |
27 | 26 |
28 protected: | 27 protected: |
29 MasterProcessDelegate() {} | 28 MasterProcessDelegate() {} |
30 ~MasterProcessDelegate() override {} | 29 ~MasterProcessDelegate() override {} |
31 | 30 |
32 private: | 31 private: |
33 MOJO_DISALLOW_COPY_AND_ASSIGN(MasterProcessDelegate); | 32 MOJO_DISALLOW_COPY_AND_ASSIGN(MasterProcessDelegate); |
34 }; | 33 }; |
35 | 34 |
36 inline ProcessType MasterProcessDelegate::GetType() const { | 35 inline ProcessType MasterProcessDelegate::GetType() const { |
37 return ProcessType::MASTER; | 36 return ProcessType::MASTER; |
38 } | 37 } |
39 | 38 |
40 } // namespace embedder | 39 } // namespace embedder |
41 } // namespace mojo | 40 } // namespace mojo |
42 | 41 |
43 #endif // MOJO_EDK_EMBEDDER_MASTER_PROCESS_DELEGATE_H_ | 42 #endif // MOJO_EDK_EMBEDDER_MASTER_PROCESS_DELEGATE_H_ |
OLD | NEW |