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

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

Issue 1290323002: HTMLViewer no longer connects to NetworkService interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 4 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_IMPL_H_ 5 #ifndef MOJO_SERVICES_NETWORK_NETWORK_SERVICE_IMPL_H_
6 #define MOJO_SERVICES_NETWORK_NETWORK_SERVICE_IMPL_H_ 6 #define MOJO_SERVICES_NETWORK_NETWORK_SERVICE_IMPL_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "mojo/application/public/cpp/app_lifetime_helper.h" 9 #include "mojo/application/public/cpp/app_lifetime_helper.h"
10 #include "mojo/services/network/public/interfaces/network_service.mojom.h" 10 #include "mojo/services/network/public/interfaces/network_service.mojom.h"
11 #include "third_party/mojo/src/mojo/public/cpp/bindings/strong_binding.h" 11 #include "third_party/mojo/src/mojo/public/cpp/bindings/strong_binding.h"
12 #include "url/gurl.h" 12 #include "url/gurl.h"
13 13
14 namespace mojo { 14 namespace mojo {
15 class ApplicationConnection;
16 class NetworkContext;
17 15
18 class NetworkServiceImpl : public NetworkService { 16 class NetworkServiceImpl : public NetworkService {
19 public: 17 public:
20 NetworkServiceImpl(ApplicationConnection* connection, 18 NetworkServiceImpl(scoped_ptr<mojo::AppRefCount> app_refcount,
21 NetworkContext* context,
22 scoped_ptr<mojo::AppRefCount> app_refcount,
23 InterfaceRequest<NetworkService> request); 19 InterfaceRequest<NetworkService> request);
24 ~NetworkServiceImpl() override; 20 ~NetworkServiceImpl() override;
25 21
26 // NetworkService methods: 22 // NetworkService methods:
27 void GetCookieStore(InterfaceRequest<CookieStore> store) override;
28 void CreateWebSocket(InterfaceRequest<WebSocket> socket) override;
29 void CreateTCPBoundSocket( 23 void CreateTCPBoundSocket(
30 NetAddressPtr local_address, 24 NetAddressPtr local_address,
31 InterfaceRequest<TCPBoundSocket> bound_socket, 25 InterfaceRequest<TCPBoundSocket> bound_socket,
32 const CreateTCPBoundSocketCallback& callback) override; 26 const CreateTCPBoundSocketCallback& callback) override;
33 void CreateTCPConnectedSocket( 27 void CreateTCPConnectedSocket(
34 NetAddressPtr remote_address, 28 NetAddressPtr remote_address,
35 ScopedDataPipeConsumerHandle send_stream, 29 ScopedDataPipeConsumerHandle send_stream,
36 ScopedDataPipeProducerHandle receive_stream, 30 ScopedDataPipeProducerHandle receive_stream,
37 InterfaceRequest<TCPConnectedSocket> client_socket, 31 InterfaceRequest<TCPConnectedSocket> client_socket,
38 const CreateTCPConnectedSocketCallback& callback) override; 32 const CreateTCPConnectedSocketCallback& callback) override;
39 void CreateUDPSocket(InterfaceRequest<UDPSocket> socket) override; 33 void CreateUDPSocket(InterfaceRequest<UDPSocket> socket) override;
40 void CreateHttpServer(NetAddressPtr local_address, 34 void CreateHttpServer(NetAddressPtr local_address,
41 HttpServerDelegatePtr delegate, 35 HttpServerDelegatePtr delegate,
42 const CreateHttpServerCallback& callback) override; 36 const CreateHttpServerCallback& callback) override;
43 void GetMimeTypeFromFile( 37 void GetMimeTypeFromFile(
44 const mojo::String& file_path, 38 const mojo::String& file_path,
45 const GetMimeTypeFromFileCallback& callback) override; 39 const GetMimeTypeFromFileCallback& callback) override;
46 40
47 private: 41 private:
48 NetworkContext* context_;
49 scoped_ptr<mojo::AppRefCount> app_refcount_; 42 scoped_ptr<mojo::AppRefCount> app_refcount_;
50 GURL origin_;
51 StrongBinding<NetworkService> binding_; 43 StrongBinding<NetworkService> binding_;
52 }; 44 };
53 45
54 } // namespace mojo 46 } // namespace mojo
55 47
56 #endif // MOJO_SERVICES_NETWORK_NETWORK_SERVICE_IMPL_H_ 48 #endif // MOJO_SERVICES_NETWORK_NETWORK_SERVICE_IMPL_H_
OLDNEW
« no previous file with comments | « mojo/services/network/network_service_delegate.cc ('k') | mojo/services/network/network_service_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698