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 SKY_SHELL_SHELL_H_ | 5 #ifndef SKY_SHELL_SHELL_H_ |
6 #define SKY_SHELL_SHELL_H_ | 6 #define SKY_SHELL_SHELL_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "sky/shell/gpu/rasterizer.h" | |
12 #include "sky/shell/sky_view.h" | |
13 #include "sky/shell/ui/engine.h" | |
14 | 11 |
15 namespace base { | 12 namespace base { |
16 class Thread; | 13 class Thread; |
17 class SingleThreadTaskRunner; | 14 class SingleThreadTaskRunner; |
18 } | 15 } |
19 | 16 |
20 namespace sky { | 17 namespace sky { |
21 namespace shell { | 18 namespace shell { |
| 19 class Engine; |
| 20 class Rasterizer; |
22 class SkyView; | 21 class SkyView; |
23 | 22 |
24 class Shell : public SkyView::Delegate { | 23 class Shell { |
25 public: | 24 public: |
26 explicit Shell(scoped_refptr<base::SingleThreadTaskRunner> java_task_runner); | 25 explicit Shell(scoped_refptr<base::SingleThreadTaskRunner> java_task_runner); |
27 ~Shell(); | 26 ~Shell(); |
28 | 27 |
29 void Init(); | 28 void Init(); |
30 | 29 |
31 private: | 30 private: |
32 void OnAcceleratedWidgetAvailable(gfx::AcceleratedWidget widget) override; | |
33 void OnDestroyed() override; | |
34 | |
35 scoped_refptr<base::SingleThreadTaskRunner> java_task_runner_; | 31 scoped_refptr<base::SingleThreadTaskRunner> java_task_runner_; |
36 scoped_ptr<base::Thread> gpu_thread_; | 32 scoped_ptr<base::Thread> gpu_thread_; |
37 scoped_ptr<base::Thread> ui_thread_; | 33 scoped_ptr<base::Thread> ui_thread_; |
38 | 34 |
39 scoped_ptr<SkyView> view_; | 35 scoped_ptr<SkyView> view_; |
40 scoped_ptr<Rasterizer> rasterizer_; | 36 scoped_ptr<Rasterizer> rasterizer_; |
41 scoped_ptr<Engine> engine_; | 37 scoped_ptr<Engine> engine_; |
42 | 38 |
43 DISALLOW_COPY_AND_ASSIGN(Shell); | 39 DISALLOW_COPY_AND_ASSIGN(Shell); |
44 }; | 40 }; |
45 | 41 |
46 } // namespace shell | 42 } // namespace shell |
47 } // namespace sky | 43 } // namespace sky |
48 | 44 |
49 #endif // SKY_SHELL_SHELL_H_ | 45 #endif // SKY_SHELL_SHELL_H_ |
OLD | NEW |