blob: b995edcfd2c64a821b3df27d00da8c86e4985b49 [file] [log] [blame]
James Robinson646469d2014-10-03 15:33:28 -07001// 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.
4
5#ifndef MOJO_EXAMPLES_TEST_EXAMPLE_SERVICE_APPLICATION_H_
6#define MOJO_EXAMPLES_TEST_EXAMPLE_SERVICE_APPLICATION_H_
7
Ben Goodger96d72852014-10-27 15:05:15 -07008#include "examples/apptest/example_service_impl.h"
James Robinson646469d2014-10-03 15:33:28 -07009#include "mojo/public/cpp/application/application_delegate.h"
Michael Wassermancb82b1f2014-11-17 15:28:04 -080010#include "mojo/public/cpp/application/interface_factory.h"
James Robinson646469d2014-10-03 15:33:28 -070011#include "mojo/public/cpp/system/macros.h"
12
13namespace mojo {
14
15class ApplicationConnection;
16
Michael Wassermancb82b1f2014-11-17 15:28:04 -080017class ExampleServiceApplication : public ApplicationDelegate,
18 public InterfaceFactory<ExampleService> {
James Robinson646469d2014-10-03 15:33:28 -070019 public:
20 ExampleServiceApplication();
Michael Wassermancb82b1f2014-11-17 15:28:04 -080021 ~ExampleServiceApplication() override;
James Robinson646469d2014-10-03 15:33:28 -070022
23 private:
24 // ApplicationDelegate implementation.
Michael Wassermancb82b1f2014-11-17 15:28:04 -080025 bool ConfigureIncomingConnection(
James Robinson646469d2014-10-03 15:33:28 -070026 ApplicationConnection* connection) override;
27
Michael Wassermancb82b1f2014-11-17 15:28:04 -080028 // InterfaceFactory<ExampleService> implementation.
29 void Create(ApplicationConnection* connection,
30 InterfaceRequest<ExampleService> request) override;
James Robinson646469d2014-10-03 15:33:28 -070031
32 MOJO_DISALLOW_COPY_AND_ASSIGN(ExampleServiceApplication);
33};
34
35} // namespace mojo
36
37#endif // MOJO_EXAMPLES_TEST_EXAMPLE_SERVICE_APPLICATION_H_