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

Side by Side Diff: mash/app_driver/app_driver.h

Issue 2062333002: mojo::Callback -> base::Callback (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 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 | « device/usb/mojo/device_manager_impl.cc ('k') | mash/app_driver/app_driver.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 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>
11 11
12 #include "base/callback.h" 12 #include "base/callback.h"
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/memory/weak_ptr.h" 14 #include "base/memory/weak_ptr.h"
15 #include "components/mus/public/interfaces/accelerator_registrar.mojom.h" 15 #include "components/mus/public/interfaces/accelerator_registrar.mojom.h"
16 #include "mojo/public/cpp/bindings/binding.h" 16 #include "mojo/public/cpp/bindings/binding.h"
17 #include "services/catalog/public/interfaces/catalog.mojom.h" 17 #include "services/catalog/public/interfaces/catalog.mojom.h"
18 #include "services/shell/public/cpp/shell_client.h" 18 #include "services/shell/public/cpp/shell_client.h"
19 19
20 namespace mash { 20 namespace mash {
21 namespace app_driver { 21 namespace app_driver {
22 22
23 class AppDriver : public shell::ShellClient, 23 class AppDriver : public shell::ShellClient,
24 public mus::mojom::AcceleratorHandler { 24 public mus::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( 30 void OnAvailableCatalogEntries(mojo::Array<catalog::mojom::EntryPtr> entries);
31 const mojo::Array<catalog::mojom::EntryPtr>& entries);
32 31
33 // shell::ShellClient: 32 // shell::ShellClient:
34 void Initialize(shell::Connector* connector, 33 void Initialize(shell::Connector* connector,
35 const shell::Identity& identity, 34 const shell::Identity& identity,
36 uint32_t id) override; 35 uint32_t id) override;
37 bool AcceptConnection(shell::Connection* connection) override; 36 bool AcceptConnection(shell::Connection* connection) override;
38 bool ShellConnectionLost() override; 37 bool ShellConnectionLost() override;
39 38
40 // mus::mojom::AcceleratorHandler: 39 // mus::mojom::AcceleratorHandler:
41 void OnAccelerator(uint32_t id, std::unique_ptr<ui::Event> event) override; 40 void OnAccelerator(uint32_t id, std::unique_ptr<ui::Event> event) override;
42 41
43 void AddAccelerators(); 42 void AddAccelerators();
44 43
45 shell::Connector* connector_; 44 shell::Connector* connector_;
46 catalog::mojom::CatalogPtr catalog_; 45 catalog::mojom::CatalogPtr catalog_;
47 mojo::Binding<mus::mojom::AcceleratorHandler> binding_; 46 mojo::Binding<mus::mojom::AcceleratorHandler> binding_;
48 base::WeakPtrFactory<AppDriver> weak_factory_; 47 base::WeakPtrFactory<AppDriver> weak_factory_;
49 48
50 DISALLOW_COPY_AND_ASSIGN(AppDriver); 49 DISALLOW_COPY_AND_ASSIGN(AppDriver);
51 }; 50 };
52 51
53 } // namespace app_driver 52 } // namespace app_driver
54 } // namespace mash 53 } // namespace mash
55 54
56 #endif // MASH_APP_DRIVER_APP_DRIVER_H_ 55 #endif // MASH_APP_DRIVER_APP_DRIVER_H_
OLDNEW
« no previous file with comments | « device/usb/mojo/device_manager_impl.cc ('k') | mash/app_driver/app_driver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698