Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / mojo / services / public / cpp / view_manager / view_manager_client_factory.h
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.
4
5 #ifndef MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_VIEW_MANAGER_CLIENT_FACTORY_H_
6 #define MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_VIEW_MANAGER_CLIENT_FACTORY_H_
7
8 #include "mojo/public/cpp/application/interface_factory.h"
9 #include "mojo/services/public/interfaces/view_manager/view_manager.mojom.h"
10
11 namespace mojo {
12
13 class ViewManagerDelegate;
14
15 // Add an instance of this class to an incoming connection to allow it to
16 // instantiate ViewManagerClient implementations in response to
17 // ViewManagerClient requests.
18 class ViewManagerClientFactory : public InterfaceFactory<ViewManagerClient> {
19  public:
20   explicit ViewManagerClientFactory(ViewManagerDelegate* delegate);
21   virtual ~ViewManagerClientFactory();
22
23   // InterfaceFactory<ViewManagerClient> implementation.
24   virtual void Create(ApplicationConnection* connection,
25                       InterfaceRequest<ViewManagerClient> request)
26       MOJO_OVERRIDE;
27
28  private:
29   ViewManagerDelegate* delegate_;
30 };
31
32 }  // namespace mojo
33
34 #endif  // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_VIEW_MANAGER_CLIENT_FACTORY_H_