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