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