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

Side by Side Diff: mash/browser_driver/browser_driver_application_delegate.h

Issue 1675083002: Rename ApplicationDelegate to ShellClient (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@delegate
Patch Set: . Created 4 years, 10 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 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_BROWSER_DRIVER_BROWSER_DRIVER_APPLICATION_DELEGATE_H_ 5 #ifndef MASH_BROWSER_DRIVER_BROWSER_DRIVER_APPLICATION_DELEGATE_H_
6 #define MASH_BROWSER_DRIVER_BROWSER_DRIVER_APPLICATION_DELEGATE_H_ 6 #define MASH_BROWSER_DRIVER_BROWSER_DRIVER_APPLICATION_DELEGATE_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/scoped_ptr.h" 14 #include "base/memory/scoped_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 "mojo/shell/public/cpp/application_delegate.h" 17 #include "mojo/shell/public/cpp/shell_client.h"
18
19 namespace mojo {
20 class ApplicationConnection;
21 }
22 18
23 namespace mash { 19 namespace mash {
24 namespace browser_driver { 20 namespace browser_driver {
25 21
26 class BrowserDriverApplicationDelegate : public mojo::ApplicationDelegate, 22 class BrowserDriverApplicationDelegate : public mojo::ShellClient,
27 public mus::mojom::AcceleratorHandler { 23 public mus::mojom::AcceleratorHandler {
28 public: 24 public:
29 BrowserDriverApplicationDelegate(); 25 BrowserDriverApplicationDelegate();
30 ~BrowserDriverApplicationDelegate() override; 26 ~BrowserDriverApplicationDelegate() override;
31 27
32 private: 28 private:
33 // mojo::ApplicationDelegate: 29 // mojo::ShellClient:
34 void Initialize(mojo::Shell* shell, const std::string& url, 30 void Initialize(mojo::Shell* shell, const std::string& url,
35 uint32_t id) override; 31 uint32_t id) override;
36 bool AcceptConnection( 32 bool AcceptConnection(mojo::Connection* connection) override;
37 mojo::ApplicationConnection* connection) override;
38 33
39 // mus::mojom::AcceleratorHandler: 34 // mus::mojom::AcceleratorHandler:
40 void OnAccelerator(uint32_t id, mus::mojom::EventPtr event) override; 35 void OnAccelerator(uint32_t id, mus::mojom::EventPtr event) override;
41 36
42 void AddAccelerators(); 37 void AddAccelerators();
43 38
44 mojo::Shell* shell_; 39 mojo::Shell* shell_;
45 mojo::Binding<mus::mojom::AcceleratorHandler> binding_; 40 mojo::Binding<mus::mojom::AcceleratorHandler> binding_;
46 41
47 DISALLOW_COPY_AND_ASSIGN(BrowserDriverApplicationDelegate); 42 DISALLOW_COPY_AND_ASSIGN(BrowserDriverApplicationDelegate);
48 }; 43 };
49 44
50 } // namespace browser_driver 45 } // namespace browser_driver
51 } // namespace mash 46 } // namespace mash
52 47
53 #endif // MASH_BROWSER_DRIVER_BROWSER_DRIVER_APPLICATION_DELEGATE_H_ 48 #endif // MASH_BROWSER_DRIVER_BROWSER_DRIVER_APPLICATION_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698