| 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 IPC_MOJO_SCOPED_IPC_SUPPORT_H_ | |
| 6 #define IPC_MOJO_SCOPED_IPC_SUPPORT_H_ | |
| 7 | |
| 8 #include "base/macros.h" | |
| 9 #include "base/memory/ref_counted.h" | |
| 10 #include "base/task_runner.h" | |
| 11 | |
| 12 namespace IPC { | |
| 13 | |
| 14 // Performs any necessary Mojo IPC initialization on construction, and shuts | |
| 15 // down Mojo IPC on destruction. | |
| 16 // | |
| 17 // This should be instantiated once per process and retained as long as Mojo IPC | |
| 18 // is needed. The TaskRunner passed to the constructor should outlive this | |
| 19 // object. | |
| 20 class ScopedIPCSupport { | |
| 21 public: | |
| 22 ScopedIPCSupport(scoped_refptr<base::TaskRunner> io_thread_task_runner); | |
| 23 ~ScopedIPCSupport(); | |
| 24 | |
| 25 private: | |
| 26 DISALLOW_COPY_AND_ASSIGN(ScopedIPCSupport); | |
| 27 }; | |
| 28 | |
| 29 } // namespace IPC | |
| 30 | |
| 31 #endif // IPC_MOJO_SCOPED_IPC_SUPPORT_H_ | |
| OLD | NEW |