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

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

Issue 1674903003: Extract shell methods from ApplicationImpl into a base class, and pass this to Initialize() instead. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojom
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>
(...skipping 13 matching lines...) Expand all
24 namespace browser_driver { 24 namespace browser_driver {
25 25
26 class BrowserDriverApplicationDelegate : public mojo::ApplicationDelegate, 26 class BrowserDriverApplicationDelegate : public mojo::ApplicationDelegate,
27 public mus::mojom::AcceleratorHandler { 27 public mus::mojom::AcceleratorHandler {
28 public: 28 public:
29 BrowserDriverApplicationDelegate(); 29 BrowserDriverApplicationDelegate();
30 ~BrowserDriverApplicationDelegate() override; 30 ~BrowserDriverApplicationDelegate() override;
31 31
32 private: 32 private:
33 // mojo::ApplicationDelegate: 33 // mojo::ApplicationDelegate:
34 void Initialize(mojo::ApplicationImpl* app) override; 34 void Initialize(mojo::Shell* shell, const std::string& url,
35 uint32_t id) override;
35 bool AcceptConnection( 36 bool AcceptConnection(
36 mojo::ApplicationConnection* connection) override; 37 mojo::ApplicationConnection* connection) override;
37 38
38 // mus::mojom::AcceleratorHandler: 39 // mus::mojom::AcceleratorHandler:
39 void OnAccelerator(uint32_t id, mus::mojom::EventPtr event) override; 40 void OnAccelerator(uint32_t id, mus::mojom::EventPtr event) override;
40 41
41 void AddAccelerators(); 42 void AddAccelerators();
42 43
43 mojo::ApplicationImpl* app_; 44 mojo::Shell* shell_;
44 mojo::Binding<mus::mojom::AcceleratorHandler> binding_; 45 mojo::Binding<mus::mojom::AcceleratorHandler> binding_;
45 46
46 DISALLOW_COPY_AND_ASSIGN(BrowserDriverApplicationDelegate); 47 DISALLOW_COPY_AND_ASSIGN(BrowserDriverApplicationDelegate);
47 }; 48 };
48 49
49 } // namespace browser_driver 50 } // namespace browser_driver
50 } // namespace mash 51 } // namespace mash
51 52
52 #endif // MASH_BROWSER_DRIVER_BROWSER_DRIVER_APPLICATION_DELEGATE_H_ 53 #endif // MASH_BROWSER_DRIVER_BROWSER_DRIVER_APPLICATION_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698