Add ICU message format support
[chromium-blink-merge.git] / mojo / services / network / network_service_impl.h
blob5f063ebbfd7e6aba703def0fd2a7b1137b73e497
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
3 // found in the LICENSE file.
5 #ifndef MOJO_SERVICES_NETWORK_NETWORK_SERVICE_IMPL_H_
6 #define MOJO_SERVICES_NETWORK_NETWORK_SERVICE_IMPL_H_
8 #include "base/compiler_specific.h"
9 #include "mojo/application/public/cpp/app_lifetime_helper.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"
12 #include "url/gurl.h"
14 namespace mojo {
15 class ApplicationConnection;
16 class NetworkContext;
18 class NetworkServiceImpl : public NetworkService {
19 public:
20 NetworkServiceImpl(ApplicationConnection* connection,
21 NetworkContext* context,
22 scoped_ptr<mojo::AppRefCount> app_refcount,
23 InterfaceRequest<NetworkService> request);
24 ~NetworkServiceImpl() override;
26 // NetworkService methods:
27 void GetCookieStore(InterfaceRequest<CookieStore> store) override;
28 void CreateWebSocket(InterfaceRequest<WebSocket> socket) override;
29 void CreateTCPBoundSocket(
30 NetAddressPtr local_address,
31 InterfaceRequest<TCPBoundSocket> bound_socket,
32 const CreateTCPBoundSocketCallback& callback) override;
33 void CreateTCPConnectedSocket(
34 NetAddressPtr remote_address,
35 ScopedDataPipeConsumerHandle send_stream,
36 ScopedDataPipeProducerHandle receive_stream,
37 InterfaceRequest<TCPConnectedSocket> client_socket,
38 const CreateTCPConnectedSocketCallback& callback) override;
39 void CreateUDPSocket(InterfaceRequest<UDPSocket> socket) override;
40 void CreateHttpServer(NetAddressPtr local_address,
41 HttpServerDelegatePtr delegate,
42 const CreateHttpServerCallback& callback) override;
43 void GetMimeTypeFromFile(
44 const mojo::String& file_path,
45 const GetMimeTypeFromFileCallback& callback) override;
47 private:
48 NetworkContext* context_;
49 scoped_ptr<mojo::AppRefCount> app_refcount_;
50 GURL origin_;
51 StrongBinding<NetworkService> binding_;
54 } // namespace mojo
56 #endif // MOJO_SERVICES_NETWORK_NETWORK_SERVICE_IMPL_H_