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