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_LIB_VIEW_MANAGER_CLIENT_IMPL_H_ | 5 #ifndef MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_LIB_VIEW_MANAGER_CLIENT_IMPL_H_ |
6 #define MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_LIB_VIEW_MANAGER_CLIENT_IMPL_H_ | 6 #define MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_LIB_VIEW_MANAGER_CLIENT_IMPL_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/memory/scoped_vector.h" | 10 #include "base/memory/scoped_vector.h" |
11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
12 #include "mojo/services/public/cpp/geometry/geometry_type_converters.h" | 12 #include "mojo/services/public/cpp/geometry/geometry_type_converters.h" |
13 #include "mojo/services/public/cpp/view_manager/types.h" | 13 #include "mojo/services/public/cpp/view_manager/types.h" |
14 #include "mojo/services/public/cpp/view_manager/view.h" | 14 #include "mojo/services/public/cpp/view_manager/view.h" |
15 #include "mojo/services/public/cpp/view_manager/view_manager.h" | 15 #include "mojo/services/public/cpp/view_manager/view_manager.h" |
16 #include "mojo/services/public/interfaces/view_manager/view_manager.mojom.h" | 16 #include "mojo/services/public/interfaces/view_manager/view_manager.mojom.h" |
17 #include "mojo/services/public/interfaces/window_manager/window_manager.mojom.h" | 17 #include "mojo/services/public/interfaces/window_manager/window_manager.mojom.h" |
18 | 18 |
19 class SkBitmap; | 19 class SkBitmap; |
20 | 20 |
21 namespace mojo { | 21 namespace mojo { |
22 class ApplicationConnection; | |
23 class ViewManager; | 22 class ViewManager; |
24 class ViewManagerDelegate; | 23 class ViewManagerDelegate; |
25 class ViewManagerTransaction; | 24 class ViewManagerTransaction; |
| 25 class Shell; |
26 | 26 |
27 // Manages the connection with the View Manager service. | 27 // Manages the connection with the View Manager service. |
28 class ViewManagerClientImpl : public ViewManager, | 28 class ViewManagerClientImpl : public ViewManager, |
29 public InterfaceImpl<ViewManagerClient>, | 29 public InterfaceImpl<ViewManagerClient>, |
30 public WindowManagerClient { | 30 public WindowManagerClient { |
31 public: | 31 public: |
32 ViewManagerClientImpl(ViewManagerDelegate* delegate, | 32 ViewManagerClientImpl(ViewManagerDelegate* delegate, Shell* shell); |
33 ApplicationConnection* app_connection); | |
34 virtual ~ViewManagerClientImpl(); | 33 virtual ~ViewManagerClientImpl(); |
35 | 34 |
36 bool connected() const { return connected_; } | 35 bool connected() const { return connected_; } |
37 ConnectionSpecificId connection_id() const { return connection_id_; } | 36 ConnectionSpecificId connection_id() const { return connection_id_; } |
38 | 37 |
39 // API exposed to the view implementations that pushes local changes to the | 38 // API exposed to the view implementations that pushes local changes to the |
40 // service. | 39 // service. |
41 Id CreateView(); | 40 Id CreateView(); |
42 void DestroyView(Id view_id); | 41 void DestroyView(Id view_id); |
43 | 42 |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 ViewManagerService* service_; | 148 ViewManagerService* service_; |
150 | 149 |
151 WindowManagerServicePtr window_manager_; | 150 WindowManagerServicePtr window_manager_; |
152 | 151 |
153 DISALLOW_COPY_AND_ASSIGN(ViewManagerClientImpl); | 152 DISALLOW_COPY_AND_ASSIGN(ViewManagerClientImpl); |
154 }; | 153 }; |
155 | 154 |
156 } // namespace mojo | 155 } // namespace mojo |
157 | 156 |
158 #endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_LIB_VIEW_MANAGER_CLIENT_IMPL_H_ | 157 #endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_LIB_VIEW_MANAGER_CLIENT_IMPL_H_ |
OLD | NEW |