OLD | NEW |
| (Empty) |
1 // Copyright 2016 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 MOJO_SERVICES_CATALOG_OWNER_H_ | |
6 #define MOJO_SERVICES_CATALOG_OWNER_H_ | |
7 | |
8 #include "base/macros.h" | |
9 #include "base/memory/scoped_ptr.h" | |
10 #include "mojo/shell/public/interfaces/shell_client.mojom.h" | |
11 | |
12 namespace base { | |
13 class TaskRunner; | |
14 } | |
15 | |
16 namespace mojo{ | |
17 class ShellClient; | |
18 class ShellConnection; | |
19 } | |
20 | |
21 namespace catalog { | |
22 | |
23 class Store; | |
24 | |
25 // Creates and owns an instance of the catalog. Exposes a ShellClientPtr that | |
26 // can be passed to the Shell, potentially in a different process. | |
27 class Owner { | |
28 public: | |
29 Owner(base::TaskRunner* file_task_runner, scoped_ptr<Store> store); | |
30 ~Owner(); | |
31 | |
32 mojo::shell::mojom::ShellClientPtr TakeShellClient(); | |
33 | |
34 private: | |
35 mojo::shell::mojom::ShellClientPtr shell_client_; | |
36 scoped_ptr<mojo::ShellClient> catalog_shell_client_; | |
37 scoped_ptr<mojo::ShellConnection> catalog_connection_; | |
38 | |
39 DISALLOW_COPY_AND_ASSIGN(Owner); | |
40 }; | |
41 | |
42 } // namespace catalog | |
43 | |
44 #endif // MOJO_SERVICES_CATALOG_OWNER_H_ | |
OLD | NEW |