OLD | NEW |
1 // Copyright 2015 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 MASH_EXAMPLE_WINDOW_TYPE_LAUNCHER_WINDOW_TYPE_LAUNCHER_H_ | 5 #ifndef ASH_TOUCH_HUD_MUS_TOUCH_HUD_APPLICATION_H_ |
6 #define MASH_EXAMPLE_WINDOW_TYPE_LAUNCHER_WINDOW_TYPE_LAUNCHER_H_ | 6 #define ASH_TOUCH_HUD_MUS_TOUCH_HUD_APPLICATION_H_ |
7 | 7 |
8 #include <memory> | 8 #include <map> |
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.h" |
13 #include "services/shell/public/cpp/service.h" | 13 #include "services/shell/public/cpp/service.h" |
14 | 14 |
15 namespace views { | 15 namespace views { |
16 class AuraInit; | 16 class AuraInit; |
17 class Widget; | 17 class Widget; |
18 class WindowManagerConnection; | 18 class WindowManagerConnection; |
19 } | 19 } |
20 | 20 |
21 class WindowTypeLauncher | 21 namespace ash { |
| 22 namespace touch_hud { |
| 23 |
| 24 class TouchHudApplication |
22 : public shell::Service, | 25 : public shell::Service, |
23 public mash::mojom::Launchable, | 26 public mash::mojom::Launchable, |
24 public shell::InterfaceFactory<mash::mojom::Launchable> { | 27 public shell::InterfaceFactory<mash::mojom::Launchable> { |
25 public: | 28 public: |
26 WindowTypeLauncher(); | 29 TouchHudApplication(); |
27 ~WindowTypeLauncher() override; | 30 ~TouchHudApplication() override; |
28 | |
29 void RemoveWindow(views::Widget* window); | |
30 | 31 |
31 private: | 32 private: |
32 // shell::Service: | 33 // shell::Service: |
33 void OnStart(shell::Connector* connector, | 34 void OnStart(shell::Connector* connector, |
34 const shell::Identity& identity, | 35 const shell::Identity& identity, |
35 uint32_t id) override; | 36 uint32_t id) override; |
36 bool OnConnect(shell::Connection* connection) override; | 37 bool OnConnect(shell::Connection* connection) override; |
37 | 38 |
38 // mash::mojom::Launchable: | 39 // mojom::Launchable: |
39 void Launch(uint32_t what, mash::mojom::LaunchMode how) override; | 40 void Launch(uint32_t what, mash::mojom::LaunchMode how) override; |
40 | 41 |
41 // shell::InterfaceFactory<mash::mojom::Launchable>: | 42 // shell::InterfaceFactory<mojom::Launchable>: |
42 void Create(shell::Connection* connection, | 43 void Create(shell::Connection* connection, |
43 mash::mojom::LaunchableRequest request) override; | 44 mash::mojom::LaunchableRequest request) override; |
44 | 45 |
45 shell::Connector* connector_ = nullptr; | 46 shell::Connector* connector_ = nullptr; |
46 mojo::BindingSet<mash::mojom::Launchable> bindings_; | 47 mojo::Binding<mash::mojom::Launchable> binding_; |
47 std::vector<views::Widget*> windows_; | 48 views::Widget* widget_ = nullptr; |
48 | 49 |
49 std::unique_ptr<views::AuraInit> aura_init_; | 50 std::unique_ptr<views::AuraInit> aura_init_; |
50 std::unique_ptr<views::WindowManagerConnection> window_manager_connection_; | 51 std::unique_ptr<views::WindowManagerConnection> window_manager_connection_; |
51 | 52 |
52 DISALLOW_COPY_AND_ASSIGN(WindowTypeLauncher); | 53 DISALLOW_COPY_AND_ASSIGN(TouchHudApplication); |
53 }; | 54 }; |
54 | 55 |
55 #endif // MASH_EXAMPLE_WINDOW_TYPE_LAUNCHER_WINDOW_TYPE_LAUNCHER_H_ | 56 } // namespace touch_hud |
| 57 } // namespace ash |
| 58 |
| 59 #endif // ASH_TOUCH_HUD_MUS_TOUCH_HUD_APPLICATION_H_ |
OLD | NEW |