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

Side by Side Diff: mojo/services/network/network_service_delegate.h

Issue 1161463004: Move URL Loader creation to a separate factory object. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 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 | « mojo/services/network/BUILD.gn ('k') | mojo/services/network/network_service_delegate.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 MOJO_SERVICES_NETWORK_NETWORK_SERVICE_DELEGATE_H_ 5 #ifndef MOJO_SERVICES_NETWORK_NETWORK_SERVICE_DELEGATE_H_
6 #define MOJO_SERVICES_NETWORK_NETWORK_SERVICE_DELEGATE_H_ 6 #define MOJO_SERVICES_NETWORK_NETWORK_SERVICE_DELEGATE_H_
7 7
8 #include "mojo/application/public/cpp/application_delegate.h" 8 #include "mojo/application/public/cpp/application_delegate.h"
9 #include "mojo/application/public/cpp/application_impl.h" 9 #include "mojo/application/public/cpp/application_impl.h"
10 #include "mojo/application/public/cpp/interface_factory.h" 10 #include "mojo/application/public/cpp/interface_factory.h"
11 #include "mojo/services/network/network_context.h" 11 #include "mojo/services/network/network_context.h"
12 #include "mojo/services/network/network_service_impl.h" 12 #include "mojo/services/network/public/interfaces/network_service.mojom.h"
13 #include "mojo/services/network/public/interfaces/url_loader_factory.mojom.h"
13 #include "third_party/mojo/src/mojo/public/cpp/bindings/interface_ptr.h" 14 #include "third_party/mojo/src/mojo/public/cpp/bindings/interface_ptr.h"
14 15
15 class NetworkServiceDelegate 16 class NetworkServiceDelegate
16 : public mojo::ApplicationDelegate, 17 : public mojo::ApplicationDelegate,
17 public mojo::InterfaceFactory<mojo::NetworkService> { 18 public mojo::InterfaceFactory<mojo::NetworkService>,
19 public mojo::InterfaceFactory<mojo::URLLoaderFactory> {
18 public: 20 public:
19 NetworkServiceDelegate(); 21 NetworkServiceDelegate();
20 ~NetworkServiceDelegate() override; 22 ~NetworkServiceDelegate() override;
21 23
22 private: 24 private:
23 // mojo::ApplicationDelegate implementation. 25 // mojo::ApplicationDelegate implementation.
24 void Initialize(mojo::ApplicationImpl* app) override; 26 void Initialize(mojo::ApplicationImpl* app) override;
25 bool ConfigureIncomingConnection( 27 bool ConfigureIncomingConnection(
26 mojo::ApplicationConnection* connection) override; 28 mojo::ApplicationConnection* connection) override;
27 void Quit() override; 29 void Quit() override;
28 30
29 // mojo::InterfaceFactory<mojo::NetworkService> implementation. 31 // mojo::InterfaceFactory<mojo::NetworkService> implementation.
30 void Create(mojo::ApplicationConnection* connection, 32 void Create(mojo::ApplicationConnection* connection,
31 mojo::InterfaceRequest<mojo::NetworkService> request) override; 33 mojo::InterfaceRequest<mojo::NetworkService> request) override;
32 34
35 // mojo::InterfaceFactory<mojo::URLLoaderFactory> implementation.
36 void Create(mojo::ApplicationConnection* connection,
37 mojo::InterfaceRequest<mojo::URLLoaderFactory> request) override;
38
33 private: 39 private:
34 mojo::ApplicationImpl* app_; 40 mojo::ApplicationImpl* app_;
35 scoped_ptr<mojo::NetworkContext> context_; 41 scoped_ptr<mojo::NetworkContext> context_;
36 }; 42 };
37 43
38 #endif // MOJO_SERVICES_NETWORK_NETWORK_SERVICE_DELEGATE_H_ 44 #endif // MOJO_SERVICES_NETWORK_NETWORK_SERVICE_DELEGATE_H_
OLDNEW
« no previous file with comments | « mojo/services/network/BUILD.gn ('k') | mojo/services/network/network_service_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698