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_VIEW_MANAGER_ROOT_VIEW_MANAGER_H_ | 5 #ifndef MOJO_SERVICES_VIEW_MANAGER_ROOT_VIEW_MANAGER_H_ |
6 #define MOJO_SERVICES_VIEW_MANAGER_ROOT_VIEW_MANAGER_H_ | 6 #define MOJO_SERVICES_VIEW_MANAGER_ROOT_VIEW_MANAGER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "mojo/public/cpp/gles2/gles2.h" | 12 #include "mojo/public/cpp/gles2/gles2.h" |
13 #include "mojo/services/view_manager/view_manager_export.h" | 13 #include "mojo/services/view_manager/view_manager_export.h" |
14 | 14 |
15 namespace aura { | 15 namespace aura { |
16 namespace client { | 16 namespace client { |
17 class WindowTreeClient; | 17 class WindowTreeClient; |
18 } | 18 } |
19 class WindowTreeHost; | 19 class WindowTreeHost; |
20 } | 20 } |
21 | 21 |
22 namespace gfx { | 22 namespace gfx { |
23 class Screen; | 23 class Screen; |
24 } | 24 } |
25 | 25 |
26 namespace mojo { | 26 namespace mojo { |
27 | 27 |
28 class Shell; | 28 class ServiceProvider; |
29 | 29 |
30 namespace view_manager { | 30 namespace view_manager { |
31 namespace service { | 31 namespace service { |
32 | 32 |
33 class RootNodeManager; | 33 class RootNodeManager; |
34 | 34 |
35 // RootViewManager binds the root node to an actual display. | 35 // RootViewManager binds the root node to an actual display. |
36 class MOJO_VIEW_MANAGER_EXPORT RootViewManager { | 36 class MOJO_VIEW_MANAGER_EXPORT RootViewManager { |
37 public: | 37 public: |
38 RootViewManager(Shell* shell, RootNodeManager* root_node); | 38 RootViewManager(ServiceProvider* service_provider, |
| 39 RootNodeManager* root_node); |
39 virtual ~RootViewManager(); | 40 virtual ~RootViewManager(); |
40 | 41 |
41 // See description above field for details. | 42 // See description above field for details. |
42 bool in_setup() const { return in_setup_; } | 43 bool in_setup() const { return in_setup_; } |
43 | 44 |
44 private: | 45 private: |
45 void OnCompositorCreated(); | 46 void OnCompositorCreated(); |
46 | 47 |
47 Shell* shell_; | 48 ServiceProvider* service_provider_; |
48 RootNodeManager* root_node_manager_; | 49 RootNodeManager* root_node_manager_; |
49 | 50 |
50 GLES2Initializer gles_initializer_; | 51 GLES2Initializer gles_initializer_; |
51 | 52 |
52 // Returns true if adding the root node's window to |window_tree_host_|. | 53 // Returns true if adding the root node's window to |window_tree_host_|. |
53 bool in_setup_; | 54 bool in_setup_; |
54 | 55 |
55 scoped_ptr<gfx::Screen> screen_; | 56 scoped_ptr<gfx::Screen> screen_; |
56 scoped_ptr<aura::WindowTreeHost> window_tree_host_; | 57 scoped_ptr<aura::WindowTreeHost> window_tree_host_; |
57 scoped_ptr<aura::client::WindowTreeClient> window_tree_client_; | 58 scoped_ptr<aura::client::WindowTreeClient> window_tree_client_; |
58 | 59 |
59 DISALLOW_COPY_AND_ASSIGN(RootViewManager); | 60 DISALLOW_COPY_AND_ASSIGN(RootViewManager); |
60 }; | 61 }; |
61 | 62 |
62 } // namespace service | 63 } // namespace service |
63 } // namespace view_manager | 64 } // namespace view_manager |
64 } // namespace mojo | 65 } // namespace mojo |
65 | 66 |
66 #endif // MOJO_SERVICES_VIEW_MANAGER_ROOT_VIEW_MANAGER_H_ | 67 #endif // MOJO_SERVICES_VIEW_MANAGER_ROOT_VIEW_MANAGER_H_ |
OLD | NEW |