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.
5 #ifndef MOJO_SERVICES_NETWORK_NETWORK_SERVICE_DELEGATE_H_
6 #define MOJO_SERVICES_NETWORK_NETWORK_SERVICE_DELEGATE_H_
8 #include "mojo/public/cpp/application/application_impl.h"
9 #include "mojo/services/network/network_context.h"
10 #include "mojo/services/network/network_service_impl.h"
11 #include "third_party/mojo/src/mojo/public/cpp/application/application_delegate.h"
12 #include "third_party/mojo/src/mojo/public/cpp/application/interface_factory.h"
13 #include "third_party/mojo/src/mojo/public/cpp/bindings/interface_ptr.h"
15 class NetworkServiceDelegate
16 : public mojo::ApplicationDelegate
,
17 public mojo::InterfaceFactory
<mojo::NetworkService
> {
19 NetworkServiceDelegate();
20 ~NetworkServiceDelegate() override
;
23 // mojo::ApplicationDelegate implementation.
24 void Initialize(mojo::ApplicationImpl
* app
) override
;
25 bool ConfigureIncomingConnection(
26 mojo::ApplicationConnection
* connection
) override
;
29 // mojo::InterfaceFactory<mojo::NetworkService> implementation.
30 void Create(mojo::ApplicationConnection
* connection
,
31 mojo::InterfaceRequest
<mojo::NetworkService
> request
) override
;
34 scoped_ptr
<mojo::NetworkContext
> context_
;
37 #endif // MOJO_SERVICES_NETWORK_NETWORK_SERVICE_DELEGATE_H_