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