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