OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_VIEW_MANAGER_CLIENT_FACTORY_H_ | 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_ | 6 #define MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_VIEW_MANAGER_CLIENT_FACTORY_H_ |
7 | 7 |
8 #include "mojo/public/cpp/application/interface_factory.h" | 8 #include "mojo/public/cpp/application/interface_factory.h" |
9 #include "mojo/services/public/interfaces/view_manager/view_manager.mojom.h" | 9 #include "mojo/services/public/interfaces/view_manager/view_manager.mojom.h" |
10 | 10 |
11 namespace mojo { | 11 namespace mojo { |
12 namespace view_manager { | |
13 | 12 |
14 class ViewManagerDelegate; | 13 class ViewManagerDelegate; |
15 | 14 |
16 // Add an instance of this class to an incoming connection to allow it to | 15 // Add an instance of this class to an incoming connection to allow it to |
17 // instantiate ViewManagerClient implementations in response to | 16 // instantiate ViewManagerClient implementations in response to |
18 // ViewManagerClient requests. | 17 // ViewManagerClient requests. |
19 class ViewManagerClientFactory : public InterfaceFactory<ViewManagerClient> { | 18 class ViewManagerClientFactory : public InterfaceFactory<ViewManagerClient> { |
20 public: | 19 public: |
21 explicit ViewManagerClientFactory(ViewManagerDelegate* delegate); | 20 explicit ViewManagerClientFactory(ViewManagerDelegate* delegate); |
22 virtual ~ViewManagerClientFactory(); | 21 virtual ~ViewManagerClientFactory(); |
23 | 22 |
24 // InterfaceFactory<ViewManagerClient> implementation. | 23 // InterfaceFactory<ViewManagerClient> implementation. |
25 virtual void Create(ApplicationConnection* connection, | 24 virtual void Create(ApplicationConnection* connection, |
26 InterfaceRequest<ViewManagerClient> request) | 25 InterfaceRequest<ViewManagerClient> request) |
27 MOJO_OVERRIDE; | 26 MOJO_OVERRIDE; |
28 | 27 |
29 private: | 28 private: |
30 ViewManagerDelegate* delegate_; | 29 ViewManagerDelegate* delegate_; |
31 }; | 30 }; |
32 | 31 |
33 } // namespace view_manager | |
34 } // namespace mojo | 32 } // namespace mojo |
35 | 33 |
36 #endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_VIEW_MANAGER_CLIENT_FACTORY_H_ | 34 #endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_VIEW_MANAGER_CLIENT_FACTORY_H_ |
OLD | NEW |