| 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_PROCESS_DELEGATE_H_ | 5 #ifndef MOJO_EDK_EMBEDDER_PROCESS_DELEGATE_H_ |
| 6 #define MOJO_EDK_EMBEDDER_PROCESS_DELEGATE_H_ | 6 #define MOJO_EDK_EMBEDDER_PROCESS_DELEGATE_H_ |
| 7 | 7 |
| 8 #include "mojo/edk/embedder/process_type.h" | 8 #include "mojo/edk/embedder/process_type.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 process delegates. | 14 // An interface for process delegates. |
| 16 class MOJO_SYSTEM_IMPL_EXPORT ProcessDelegate { | 15 class ProcessDelegate { |
| 17 public: | 16 public: |
| 18 virtual ProcessType GetType() const; | 17 virtual ProcessType GetType() const; |
| 19 | 18 |
| 20 // Called when |ShutdownIPCSupport()| has "completed". Note that this is NOT | 19 // Called when |ShutdownIPCSupport()| has "completed". Note that this is NOT |
| 21 // called if |ShutdownIPCSupportOnIOThread()| is used instead. | 20 // called if |ShutdownIPCSupportOnIOThread()| is used instead. |
| 22 virtual void OnShutdownComplete() = 0; | 21 virtual void OnShutdownComplete() = 0; |
| 23 | 22 |
| 24 protected: | 23 protected: |
| 25 ProcessDelegate() {} | 24 ProcessDelegate() {} |
| 26 virtual ~ProcessDelegate() {} | 25 virtual ~ProcessDelegate() {} |
| 27 | 26 |
| 28 private: | 27 private: |
| 29 MOJO_DISALLOW_COPY_AND_ASSIGN(ProcessDelegate); | 28 MOJO_DISALLOW_COPY_AND_ASSIGN(ProcessDelegate); |
| 30 }; | 29 }; |
| 31 | 30 |
| 32 inline ProcessType ProcessDelegate::GetType() const { | 31 inline ProcessType ProcessDelegate::GetType() const { |
| 33 return ProcessType::NONE; | 32 return ProcessType::NONE; |
| 34 } | 33 } |
| 35 | 34 |
| 36 } // namespace embedder | 35 } // namespace embedder |
| 37 } // namespace mojo | 36 } // namespace mojo |
| 38 | 37 |
| 39 #endif // MOJO_EDK_EMBEDDER_PROCESS_DELEGATE_H_ | 38 #endif // MOJO_EDK_EMBEDDER_PROCESS_DELEGATE_H_ |
| OLD | NEW |