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_APP_DRIVER_APP_DRIVER_H_ | 5 #ifndef MASH_APP_DRIVER_APP_DRIVER_H_ |
6 #define MASH_APP_DRIVER_APP_DRIVER_H_ | 6 #define MASH_APP_DRIVER_APP_DRIVER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 12 matching lines...) Expand all Loading... |
23 class AppDriver : public shell::Service, | 23 class AppDriver : public shell::Service, |
24 public ui::mojom::AcceleratorHandler { | 24 public ui::mojom::AcceleratorHandler { |
25 public: | 25 public: |
26 AppDriver(); | 26 AppDriver(); |
27 ~AppDriver() override; | 27 ~AppDriver() override; |
28 | 28 |
29 private: | 29 private: |
30 void OnAvailableCatalogEntries(mojo::Array<catalog::mojom::EntryPtr> entries); | 30 void OnAvailableCatalogEntries(mojo::Array<catalog::mojom::EntryPtr> entries); |
31 | 31 |
32 // shell::Service: | 32 // shell::Service: |
33 void OnStart(shell::Connector* connector, | 33 void OnStart(const shell::Identity& identity) override; |
34 const shell::Identity& identity, | |
35 uint32_t id) override; | |
36 bool OnConnect(shell::Connection* connection) override; | 34 bool OnConnect(shell::Connection* connection) override; |
37 bool OnStop() override; | 35 bool OnStop() override; |
38 | 36 |
39 // ui::mojom::AcceleratorHandler: | 37 // ui::mojom::AcceleratorHandler: |
40 void OnAccelerator(uint32_t id, std::unique_ptr<ui::Event> event) override; | 38 void OnAccelerator(uint32_t id, std::unique_ptr<ui::Event> event) override; |
41 | 39 |
42 void AddAccelerators(); | 40 void AddAccelerators(); |
43 | 41 |
44 shell::Connector* connector_; | |
45 catalog::mojom::CatalogPtr catalog_; | 42 catalog::mojom::CatalogPtr catalog_; |
46 mojo::Binding<ui::mojom::AcceleratorHandler> binding_; | 43 mojo::Binding<ui::mojom::AcceleratorHandler> binding_; |
47 base::WeakPtrFactory<AppDriver> weak_factory_; | 44 base::WeakPtrFactory<AppDriver> weak_factory_; |
48 | 45 |
49 DISALLOW_COPY_AND_ASSIGN(AppDriver); | 46 DISALLOW_COPY_AND_ASSIGN(AppDriver); |
50 }; | 47 }; |
51 | 48 |
52 } // namespace app_driver | 49 } // namespace app_driver |
53 } // namespace mash | 50 } // namespace mash |
54 | 51 |
55 #endif // MASH_APP_DRIVER_APP_DRIVER_H_ | 52 #endif // MASH_APP_DRIVER_APP_DRIVER_H_ |
OLD | NEW |