Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1194)

Side by Side Diff: ash/touch_hud/mus/touch_hud_application.h

Issue 2150933003: mash: Add touch-hud app. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sequence. Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_VIEWS_EXAMPLES_APPLICATION_DELEGATE_H_ 5 #ifndef ASH_TOUCH_HUD_MUS_TOUCH_HUD_APPLICATION_H_
6 #define MASH_EXAMPLE_VIEWS_EXAMPLES_APPLICATION_DELEGATE_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_set.h"
13 #include "services/shell/public/cpp/service.h" 13 #include "services/shell/public/cpp/service.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 Widget;
18 class WindowManagerConnection; 19 class WindowManagerConnection;
19 } 20 }
20 21
21 class ViewsExamplesApplicationDelegate 22 namespace ash {
23 namespace touch_hud {
24
25 class TouchHudApplication
22 : public shell::Service, 26 : public shell::Service,
23 public mash::mojom::Launchable, 27 public mash::mojom::Launchable,
24 public shell::InterfaceFactory<mash::mojom::Launchable> { 28 public shell::InterfaceFactory<mash::mojom::Launchable> {
25 public: 29 public:
26 ViewsExamplesApplicationDelegate(); 30 TouchHudApplication();
27 ~ViewsExamplesApplicationDelegate() override; 31 ~TouchHudApplication() override;
28 32
29 private: 33 private:
30 // shell::Service: 34 // shell::Service:
31 void OnStart(shell::Connector* connector, 35 void OnStart(shell::Connector* connector,
32 const shell::Identity& identity, 36 const shell::Identity& identity,
33 uint32_t id) override; 37 uint32_t id) override;
34 bool OnConnect(shell::Connection* connection) override; 38 bool OnConnect(shell::Connection* connection) override;
35 39
36 // mash::mojom::Launchable: 40 // mojom::Launchable:
37 void Launch(uint32_t what, mash::mojom::LaunchMode how) override; 41 void Launch(uint32_t what, mash::mojom::LaunchMode how) override;
38 42
39 // shell::InterfaceFactory<mash::mojom::Launchable>: 43 // shell::InterfaceFactory<mojom::Launchable>:
40 void Create(shell::Connection* connection, 44 void Create(shell::Connection* connection,
41 mash::mojom::LaunchableRequest request) override; 45 mash::mojom::LaunchableRequest request) override;
42 46
47 shell::Connector* connector_ = nullptr;
43 mojo::BindingSet<mash::mojom::Launchable> bindings_; 48 mojo::BindingSet<mash::mojom::Launchable> bindings_;
sadrul 2016/07/15 15:01:11 I don't think we need a BindingSet. Use a Binding
riajiang 2016/07/15 17:01:27 Done.
49 views::Widget* widget_ = nullptr;
44 50
45 mojo::TracingImpl tracing_; 51 mojo::TracingImpl tracing_;
sadrul 2016/07/15 15:01:11 Let's start without the tracing for now.
riajiang 2016/07/15 17:01:27 Done.
46 std::unique_ptr<views::AuraInit> aura_init_; 52 std::unique_ptr<views::AuraInit> aura_init_;
47 std::unique_ptr<views::WindowManagerConnection> window_manager_connection_; 53 std::unique_ptr<views::WindowManagerConnection> window_manager_connection_;
48 54
49 DISALLOW_COPY_AND_ASSIGN(ViewsExamplesApplicationDelegate); 55 DISALLOW_COPY_AND_ASSIGN(TouchHudApplication);
50 }; 56 };
51 57
52 #endif // MASH_EXAMPLE_VIEWS_EXAMPLES_APPLICATION_DELEGATE_H_ 58 } // namespace touch_hud
59 } // namespace ash
60
61 #endif // ASH_TOUCH_HUD_MUS_TOUCH_HUD_APPLICATION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698