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

Side by Side Diff: components/devtools_service/devtools_service_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 COMPONENTS_DEVTOOLS_SERVICE_DEVTOOLS_SERVICE_DELEGATE_H_ 5 #ifndef COMPONENTS_DEVTOOLS_SERVICE_DEVTOOLS_SERVICE_DELEGATE_H_
6 #define COMPONENTS_DEVTOOLS_SERVICE_DEVTOOLS_SERVICE_DELEGATE_H_ 6 #define COMPONENTS_DEVTOOLS_SERVICE_DEVTOOLS_SERVICE_DELEGATE_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "components/devtools_service/public/interfaces/devtools_service.mojom.h " 10 #include "components/devtools_service/public/interfaces/devtools_service.mojom.h "
11 #include "mojo/shell/public/cpp/application_delegate.h" 11 #include "mojo/shell/public/cpp/application_delegate.h"
12 #include "mojo/shell/public/cpp/interface_factory.h" 12 #include "mojo/shell/public/cpp/interface_factory.h"
13 13
14 namespace devtools_service { 14 namespace devtools_service {
15 15
16 class DevToolsService; 16 class DevToolsService;
17 17
18 class DevToolsServiceDelegate 18 class DevToolsServiceDelegate
19 : public mojo::ApplicationDelegate, 19 : public mojo::ApplicationDelegate,
20 public mojo::InterfaceFactory<DevToolsRegistry>, 20 public mojo::InterfaceFactory<DevToolsRegistry>,
21 public mojo::InterfaceFactory<DevToolsCoordinator> { 21 public mojo::InterfaceFactory<DevToolsCoordinator> {
22 public: 22 public:
23 DevToolsServiceDelegate(); 23 DevToolsServiceDelegate();
24 ~DevToolsServiceDelegate() override; 24 ~DevToolsServiceDelegate() override;
25 25
26 private: 26 private:
27 // mojo::ApplicationDelegate implementation. 27 // mojo::ApplicationDelegate implementation.
28 void Initialize(mojo::ApplicationImpl* app) override; 28 void Initialize(mojo::Shell* shell, const std::string& url,
29 uint32_t id) override;
29 bool AcceptConnection( 30 bool AcceptConnection(
30 mojo::ApplicationConnection* connection) override; 31 mojo::ApplicationConnection* connection) override;
31 void Quit() override; 32 void Quit() override;
32 33
33 // mojo::InterfaceFactory<DevToolsRegistry> implementation. 34 // mojo::InterfaceFactory<DevToolsRegistry> implementation.
34 void Create(mojo::ApplicationConnection* connection, 35 void Create(mojo::ApplicationConnection* connection,
35 mojo::InterfaceRequest<DevToolsRegistry> request) override; 36 mojo::InterfaceRequest<DevToolsRegistry> request) override;
36 37
37 // mojo::InterfaceFactory<DevToolsCoordinator> implementation. 38 // mojo::InterfaceFactory<DevToolsCoordinator> implementation.
38 void Create(mojo::ApplicationConnection* connection, 39 void Create(mojo::ApplicationConnection* connection,
39 mojo::InterfaceRequest<DevToolsCoordinator> request) override; 40 mojo::InterfaceRequest<DevToolsCoordinator> request) override;
40 41
41 scoped_ptr<DevToolsService> service_; 42 scoped_ptr<DevToolsService> service_;
42 43
43 DISALLOW_COPY_AND_ASSIGN(DevToolsServiceDelegate); 44 DISALLOW_COPY_AND_ASSIGN(DevToolsServiceDelegate);
44 }; 45 };
45 46
46 } // namespace devtools_service 47 } // namespace devtools_service
47 48
48 #endif // COMPONENTS_DEVTOOLS_SERVICE_DEVTOOLS_SERVICE_DELEGATE_H_ 49 #endif // COMPONENTS_DEVTOOLS_SERVICE_DEVTOOLS_SERVICE_DELEGATE_H_
OLDNEW
« no previous file with comments | « components/devtools_service/devtools_service.cc ('k') | components/devtools_service/devtools_service_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698