| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef THIRD_PARTY_MOJO_SRC_MOJO_EDK_EMBEDDER_MASTER_PROCESS_DELEGATE_H_ | |
| 6 #define THIRD_PARTY_MOJO_SRC_MOJO_EDK_EMBEDDER_MASTER_PROCESS_DELEGATE_H_ | |
| 7 | |
| 8 #include "mojo/public/cpp/system/macros.h" | |
| 9 #include "third_party/mojo/src/mojo/edk/embedder/process_delegate.h" | |
| 10 #include "third_party/mojo/src/mojo/edk/embedder/slave_info.h" | |
| 11 #include "third_party/mojo/src/mojo/edk/system/system_impl_export.h" | |
| 12 | |
| 13 namespace mojo { | |
| 14 namespace embedder { | |
| 15 | |
| 16 // An interface for the master process delegate (which lives in the master | |
| 17 // process). | |
| 18 class MOJO_SYSTEM_IMPL_EXPORT MasterProcessDelegate : public ProcessDelegate { | |
| 19 public: | |
| 20 ProcessType GetType() const override; | |
| 21 | |
| 22 // Called when contact with the slave process specified by |slave_info| has | |
| 23 // been lost. | |
| 24 // 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. | |
| 26 virtual void OnSlaveDisconnect(SlaveInfo slave_info) = 0; | |
| 27 | |
| 28 protected: | |
| 29 MasterProcessDelegate() {} | |
| 30 ~MasterProcessDelegate() override {} | |
| 31 | |
| 32 private: | |
| 33 MOJO_DISALLOW_COPY_AND_ASSIGN(MasterProcessDelegate); | |
| 34 }; | |
| 35 | |
| 36 inline ProcessType MasterProcessDelegate::GetType() const { | |
| 37 return ProcessType::MASTER; | |
| 38 } | |
| 39 | |
| 40 } // namespace embedder | |
| 41 } // namespace mojo | |
| 42 | |
| 43 #endif // THIRD_PARTY_MOJO_SRC_MOJO_EDK_EMBEDDER_MASTER_PROCESS_DELEGATE_H_ | |
| OLD | NEW |