Chromium Code Reviews| Index: ash/common/mojo_interface_factory.h |
| diff --git a/ash/common/mojo_interface_factory.h b/ash/common/mojo_interface_factory.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..9209188a93195684d5e737a6eb2652656a2f42cf |
| --- /dev/null |
| +++ b/ash/common/mojo_interface_factory.h |
| @@ -0,0 +1,37 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef ASH_COMMON_MOJO_INTERFACE_FACTORY_H_ |
| +#define ASH_COMMON_MOJO_INTERFACE_FACTORY_H_ |
| + |
| +#include "ash/ash_export.h" |
| +#include "base/macros.h" |
| +#include "base/memory/ref_counted.h" |
| + |
| +namespace base { |
| +class SingleThreadTaskRunner; |
| +} |
| + |
| +namespace shell { |
| +class InterfaceRegistry; |
| +} |
| + |
| +namespace ash { |
| + |
| +class ASH_EXPORT MojoInterfaceFactory { |
|
James Cook
2016/09/30 21:18:26
I could also add namespace mojo_interface_factory
msw
2016/09/30 23:26:48
This seems fine to me.
|
| + public: |
| + // Registers all mojo services provided by ash. May be called on IO thread |
| + // (when running ash in-process in chrome) or on the main thread (when running |
| + // in mash). |
| + static void RegisterInterfaces( |
| + shell::InterfaceRegistry* registry, |
| + scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner); |
| + |
| + private: |
| + DISALLOW_IMPLICIT_CONSTRUCTORS(MojoInterfaceFactory); |
| +}; |
| + |
| +} // namespace ash |
| + |
| +#endif // ASH_COMMON_MOJO_INTERFACE_FACTORY_H_ |