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

Side by Side Diff: mandoline/services/updater/updater_app.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 MANDOLINE_SERVICES_UPDATER_UPDATER_APP_H_ 5 #ifndef MANDOLINE_SERVICES_UPDATER_UPDATER_APP_H_
6 #define MANDOLINE_SERVICES_UPDATER_UPDATER_APP_H_ 6 #define MANDOLINE_SERVICES_UPDATER_UPDATER_APP_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "mojo/shell/public/cpp/application_delegate.h" 9 #include "mojo/shell/public/cpp/application_delegate.h"
10 #include "mojo/shell/public/cpp/interface_factory.h" 10 #include "mojo/shell/public/cpp/interface_factory.h"
11 11
12 namespace mojo { 12 namespace mojo {
13 class ApplicationConnection; 13 class ApplicationConnection;
14 class ApplicationImpl; 14 class Shell;
15 } // namespace mojo 15 } // namespace mojo
16 16
17 namespace updater { 17 namespace updater {
18 18
19 class Updater; 19 class Updater;
20 20
21 class UpdaterApp : public mojo::ApplicationDelegate, 21 class UpdaterApp : public mojo::ApplicationDelegate,
22 public mojo::InterfaceFactory<Updater> { 22 public mojo::InterfaceFactory<Updater> {
23 public: 23 public:
24 UpdaterApp(); 24 UpdaterApp();
25 ~UpdaterApp() override; 25 ~UpdaterApp() override;
26 26
27 void Initialize(mojo::ApplicationImpl* app) override;
28
29 // mojo::ApplicationDelegate: 27 // mojo::ApplicationDelegate:
28 void Initialize(mojo::Shell* shell, const std::string& url,
29 uint32_t id) override;
30 bool AcceptConnection( 30 bool AcceptConnection(
31 mojo::ApplicationConnection* connection) override; 31 mojo::ApplicationConnection* connection) override;
32 32
33 // InterfaceFactory<Updater> implementation. 33 // InterfaceFactory<Updater> implementation.
34 void Create(mojo::ApplicationConnection* connection, 34 void Create(mojo::ApplicationConnection* connection,
35 mojo::InterfaceRequest<Updater> request) override; 35 mojo::InterfaceRequest<Updater> request) override;
36 36
37 private: 37 private:
38 mojo::ApplicationImpl* app_impl_; 38 mojo::Shell* shell_;
39 39
40 DISALLOW_COPY_AND_ASSIGN(UpdaterApp); 40 DISALLOW_COPY_AND_ASSIGN(UpdaterApp);
41 }; 41 };
42 42
43 } // namespace updater 43 } // namespace updater
44 44
45 #endif // MANDOLINE_SERVICES_UPDATER_UPDATER_APP_H_ 45 #endif // MANDOLINE_SERVICES_UPDATER_UPDATER_APP_H_
OLDNEW
« no previous file with comments | « mandoline/services/core_services/core_services_application_delegate.cc ('k') | mandoline/services/updater/updater_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698