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

Side by Side Diff: sky/services/ns_net/network_service_impl.h

Issue 1165283002: Basic network service implementation for iOS (Closed) Base URL: https://github.com/domokit/mojo.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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "mojo/public/cpp/application/interface_factory.h"
6 #include "mojo/public/cpp/bindings/strong_binding.h"
7 #include "mojo/services/network/public/interfaces/network_service.mojom.h"
8
9 namespace mojo {
10
11 class NetworkServiceImpl : public NetworkService {
12 public:
13 explicit NetworkServiceImpl(InterfaceRequest<NetworkService> request)
14 : binding_(this, request.Pass()) {}
15
16 void CreateURLLoader(mojo::InterfaceRequest<mojo::URLLoader> loader) override;
17 void GetCookieStore(
18 mojo::InterfaceRequest<mojo::CookieStore> cookie_store) override;
19 void CreateWebSocket(mojo::InterfaceRequest<mojo::WebSocket> socket) override;
20 void CreateTCPBoundSocket(
21 mojo::NetAddressPtr local_address,
eseidel 2015/06/08 20:53:53 We're in the mojo: namespace, we shouldn't need to
22 mojo::InterfaceRequest<mojo::TCPBoundSocket> bound_socket,
23 const CreateTCPBoundSocketCallback& callback) override;
24 void CreateTCPConnectedSocket(
25 mojo::NetAddressPtr remote_address,
26 mojo::ScopedDataPipeConsumerHandle send_stream,
27 mojo::ScopedDataPipeProducerHandle receive_stream,
28 mojo::InterfaceRequest<mojo::TCPConnectedSocket> client_socket,
29 const CreateTCPConnectedSocketCallback& callback) override;
30 void CreateUDPSocket(mojo::InterfaceRequest<mojo::UDPSocket> socket) override;
31 void CreateHttpServer(mojo::NetAddressPtr local_address,
32 mojo::HttpServerDelegatePtr delegate,
33 const CreateHttpServerCallback& callback) override;
34
35 private:
36 StrongBinding<NetworkService> binding_;
37 };
38
39 class NetworkServiceFactory : public InterfaceFactory<NetworkService> {
40 public:
41 void Create(ApplicationConnection* connection,
42 InterfaceRequest<NetworkService> request) override;
43 };
44
45 } // namespace mojo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698