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