OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 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 ASH_MUS_SYSUI_APPLICATION_H_ | 5 #ifndef ASH_MUS_SYSUI_APPLICATION_H_ |
6 #define ASH_MUS_SYSUI_APPLICATION_H_ | 6 #define ASH_MUS_SYSUI_APPLICATION_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "mash/shelf/public/interfaces/shelf.mojom.h" |
| 12 #include "mojo/public/cpp/bindings/binding_set.h" |
11 #include "mojo/services/tracing/public/cpp/tracing_impl.h" | 13 #include "mojo/services/tracing/public/cpp/tracing_impl.h" |
12 #include "mojo/shell/public/cpp/shell_client.h" | 14 #include "mojo/shell/public/cpp/shell_client.h" |
13 | 15 |
14 namespace ash { | 16 namespace ash { |
15 namespace sysui { | 17 namespace sysui { |
16 | 18 |
17 class AshInit; | 19 class AshInit; |
18 | 20 |
19 class SysUIApplication : public mojo::ShellClient { | 21 class SysUIApplication |
| 22 : public mojo::ShellClient, |
| 23 public mojo::InterfaceFactory<mash::shelf::mojom::ShelfController> { |
20 public: | 24 public: |
21 SysUIApplication(); | 25 SysUIApplication(); |
22 ~SysUIApplication() override; | 26 ~SysUIApplication() override; |
23 | 27 |
24 private: | 28 private: |
25 // mojo::ShellClient: | 29 // mojo::ShellClient: |
26 void Initialize(mojo::Connector* connector, | 30 void Initialize(mojo::Connector* connector, |
27 const mojo::Identity& identity, | 31 const mojo::Identity& identity, |
28 uint32_t id) override; | 32 uint32_t id) override; |
29 bool AcceptConnection(mojo::Connection* connection) override; | 33 bool AcceptConnection(mojo::Connection* connection) override; |
30 | 34 |
| 35 // InterfaceFactory<mash::shelf::mojom::ShelfController>: |
| 36 void Create(mojo::Connection* connection, |
| 37 mojo::InterfaceRequest<mash::shelf::mojom::ShelfController> |
| 38 request) override; |
| 39 |
31 mojo::TracingImpl tracing_; | 40 mojo::TracingImpl tracing_; |
32 std::unique_ptr<AshInit> ash_init_; | 41 std::unique_ptr<AshInit> ash_init_; |
33 | 42 |
| 43 mojo::BindingSet<mash::shelf::mojom::ShelfController> |
| 44 shelf_controller_bindings_; |
| 45 |
34 DISALLOW_COPY_AND_ASSIGN(SysUIApplication); | 46 DISALLOW_COPY_AND_ASSIGN(SysUIApplication); |
35 }; | 47 }; |
36 | 48 |
37 } // namespace sysui | 49 } // namespace sysui |
38 } // namespace ash | 50 } // namespace ash |
39 | 51 |
40 #endif // ASH_MUS_SYSUI_APPLICATION_H_ | 52 #endif // ASH_MUS_SYSUI_APPLICATION_H_ |
OLD | NEW |