OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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 COMPONENTS_VIEW_MANAGER_PUBLIC_CPP_VIEW_MANAGER_INIT_H_ | 5 #ifndef COMPONENTS_VIEW_MANAGER_PUBLIC_CPP_VIEW_MANAGER_INIT_H_ |
6 #define COMPONENTS_VIEW_MANAGER_PUBLIC_CPP_VIEW_MANAGER_INIT_H_ | 6 #define COMPONENTS_VIEW_MANAGER_PUBLIC_CPP_VIEW_MANAGER_INIT_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "components/view_manager/public/interfaces/view_manager.mojom.h" | 10 #include "components/view_manager/public/interfaces/view_manager.mojom.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 ViewManagerInit(ApplicationImpl* app, | 26 ViewManagerInit(ApplicationImpl* app, |
27 ViewManagerDelegate* delegate, | 27 ViewManagerDelegate* delegate, |
28 ViewManagerRootClient* root_client); | 28 ViewManagerRootClient* root_client); |
29 ~ViewManagerInit(); | 29 ~ViewManagerInit(); |
30 | 30 |
31 // Returns the ViewManagerRoot. This is only valid if |root_client| was | 31 // Returns the ViewManagerRoot. This is only valid if |root_client| was |
32 // supplied to the constructor. | 32 // supplied to the constructor. |
33 ViewManagerRoot* view_manager_root() { return view_manager_root_.get(); } | 33 ViewManagerRoot* view_manager_root() { return view_manager_root_.get(); } |
34 | 34 |
35 // Returns the application connection established with the view manager. | 35 // Returns the application connection established with the view manager. |
36 ApplicationConnection* connection() { return connection_; } | 36 ApplicationConnection* connection() { return connection_.get(); } |
37 | 37 |
38 private: | 38 private: |
39 class ClientFactory; | 39 class ClientFactory; |
40 | 40 |
41 void OnCreate(InterfaceRequest<ViewManagerClient> request); | 41 void OnCreate(InterfaceRequest<ViewManagerClient> request); |
42 | 42 |
43 ApplicationImpl* app_; | 43 ApplicationImpl* app_; |
44 ApplicationConnection* connection_; | 44 scoped_ptr<ApplicationConnection> connection_; |
45 ViewManagerDelegate* delegate_; | 45 ViewManagerDelegate* delegate_; |
46 scoped_ptr<ClientFactory> client_factory_; | 46 scoped_ptr<ClientFactory> client_factory_; |
47 ViewManagerRootPtr view_manager_root_; | 47 ViewManagerRootPtr view_manager_root_; |
48 scoped_ptr<Binding<ViewManagerRootClient>> root_client_binding_; | 48 scoped_ptr<Binding<ViewManagerRootClient>> root_client_binding_; |
49 | 49 |
50 DISALLOW_COPY_AND_ASSIGN(ViewManagerInit); | 50 DISALLOW_COPY_AND_ASSIGN(ViewManagerInit); |
51 }; | 51 }; |
52 | 52 |
53 } // namespace mojo | 53 } // namespace mojo |
54 | 54 |
55 #endif // COMPONENTS_VIEW_MANAGER_PUBLIC_CPP_VIEW_MANAGER_INIT_H_ | 55 #endif // COMPONENTS_VIEW_MANAGER_PUBLIC_CPP_VIEW_MANAGER_INIT_H_ |
OLD | NEW |