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

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

Issue 2795883002: Eliminate OnConnect usage (Closed)
Patch Set: . Created 3 years, 8 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
« no previous file with comments | « ash/mus/window_manager_application.cc ('k') | ash/touch_hud/mus/touch_hud_application.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_TOUCH_HUD_MUS_TOUCH_HUD_APPLICATION_H_ 5 #ifndef ASH_TOUCH_HUD_MUS_TOUCH_HUD_APPLICATION_H_
6 #define ASH_TOUCH_HUD_MUS_TOUCH_HUD_APPLICATION_H_ 6 #define ASH_TOUCH_HUD_MUS_TOUCH_HUD_APPLICATION_H_
7 7
8 #include <map> 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.h" 12 #include "mojo/public/cpp/bindings/binding.h"
13 #include "services/service_manager/public/cpp/binder_registry.h"
13 #include "services/service_manager/public/cpp/interface_factory.h" 14 #include "services/service_manager/public/cpp/interface_factory.h"
14 #include "services/service_manager/public/cpp/service.h" 15 #include "services/service_manager/public/cpp/service.h"
15 16
16 namespace views { 17 namespace views {
17 class AuraInit; 18 class AuraInit;
18 class Widget; 19 class Widget;
19 } 20 }
20 21
21 namespace ash { 22 namespace ash {
22 namespace touch_hud { 23 namespace touch_hud {
23 24
24 class TouchHudApplication 25 class TouchHudApplication
25 : public service_manager::Service, 26 : public service_manager::Service,
26 public mash::mojom::Launchable, 27 public mash::mojom::Launchable,
27 public service_manager::InterfaceFactory<mash::mojom::Launchable> { 28 public service_manager::InterfaceFactory<mash::mojom::Launchable> {
28 public: 29 public:
29 TouchHudApplication(); 30 TouchHudApplication();
30 ~TouchHudApplication() override; 31 ~TouchHudApplication() override;
31 32
32 private: 33 private:
33 // service_manager::Service: 34 // service_manager::Service:
34 void OnStart() override; 35 void OnStart() override;
35 bool OnConnect(const service_manager::ServiceInfo& remote_info, 36 void OnBindInterface(const service_manager::ServiceInfo& source_info,
36 service_manager::InterfaceRegistry* registry) override; 37 const std::string& interface_name,
38 mojo::ScopedMessagePipeHandle interface_pipe) override;
37 39
38 // mojom::Launchable: 40 // mojom::Launchable:
39 void Launch(uint32_t what, mash::mojom::LaunchMode how) override; 41 void Launch(uint32_t what, mash::mojom::LaunchMode how) override;
40 42
41 // service_manager::InterfaceFactory<mojom::Launchable>: 43 // service_manager::InterfaceFactory<mojom::Launchable>:
42 void Create(const service_manager::Identity& remote_identity, 44 void Create(const service_manager::Identity& remote_identity,
43 mash::mojom::LaunchableRequest request) override; 45 mash::mojom::LaunchableRequest request) override;
44 46
47 service_manager::BinderRegistry registry_;
45 mojo::Binding<mash::mojom::Launchable> binding_; 48 mojo::Binding<mash::mojom::Launchable> binding_;
46 views::Widget* widget_ = nullptr; 49 views::Widget* widget_ = nullptr;
47 50
48 std::unique_ptr<views::AuraInit> aura_init_; 51 std::unique_ptr<views::AuraInit> aura_init_;
49 52
50 DISALLOW_COPY_AND_ASSIGN(TouchHudApplication); 53 DISALLOW_COPY_AND_ASSIGN(TouchHudApplication);
51 }; 54 };
52 55
53 } // namespace touch_hud 56 } // namespace touch_hud
54 } // namespace ash 57 } // namespace ash
55 58
56 #endif // ASH_TOUCH_HUD_MUS_TOUCH_HUD_APPLICATION_H_ 59 #endif // ASH_TOUCH_HUD_MUS_TOUCH_HUD_APPLICATION_H_
OLDNEW
« no previous file with comments | « ash/mus/window_manager_application.cc ('k') | ash/touch_hud/mus/touch_hud_application.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698