| 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 "base/threading/thread.h" | 11 #include "base/threading/thread.h" |
| 12 | 12 |
| 13 namespace base { | |
| 14 class SingleThreadTaskRunner; | |
| 15 } | |
| 16 | |
| 17 namespace sky { | 13 namespace sky { |
| 18 namespace shell { | 14 namespace shell { |
| 19 class Engine; | 15 class Engine; |
| 16 class PlatformView; |
| 20 class Rasterizer; | 17 class Rasterizer; |
| 21 class PlatformView; | 18 class ServiceProviderContext; |
| 22 | 19 |
| 23 class Shell { | 20 class Shell { |
| 24 public: | 21 public: |
| 25 ~Shell(); | 22 ~Shell(); |
| 26 | 23 |
| 27 static void Init( | 24 static void Init( |
| 28 scoped_refptr<base::SingleThreadTaskRunner> java_task_runner); | 25 scoped_ptr<ServiceProviderContext> service_provider_context); |
| 29 static Shell& Shared(); | 26 static Shell& Shared(); |
| 30 | 27 |
| 31 PlatformView* view() const { return view_.get(); } | 28 PlatformView* view() const { return view_.get(); } |
| 32 | 29 |
| 33 private: | 30 private: |
| 34 explicit Shell(scoped_refptr<base::SingleThreadTaskRunner> java_task_runner); | 31 explicit Shell(scoped_ptr<ServiceProviderContext> service_provider_context); |
| 35 | 32 |
| 36 void InitGPU(const base::Thread::Options& options); | 33 void InitGPU(const base::Thread::Options& options); |
| 37 void InitUI(const base::Thread::Options& options); | 34 void InitUI(const base::Thread::Options& options); |
| 38 void InitView(); | 35 void InitView(); |
| 39 | 36 |
| 40 scoped_refptr<base::SingleThreadTaskRunner> java_task_runner_; | |
| 41 scoped_ptr<base::Thread> gpu_thread_; | 37 scoped_ptr<base::Thread> gpu_thread_; |
| 42 scoped_ptr<base::Thread> ui_thread_; | 38 scoped_ptr<base::Thread> ui_thread_; |
| 43 | 39 |
| 44 scoped_ptr<PlatformView> view_; | 40 scoped_ptr<PlatformView> view_; |
| 45 scoped_ptr<Rasterizer> rasterizer_; | 41 scoped_ptr<Rasterizer> rasterizer_; |
| 46 scoped_ptr<Engine> engine_; | 42 scoped_ptr<Engine> engine_; |
| 47 | 43 |
| 44 scoped_ptr<ServiceProviderContext> service_provider_context_; |
| 45 |
| 48 DISALLOW_COPY_AND_ASSIGN(Shell); | 46 DISALLOW_COPY_AND_ASSIGN(Shell); |
| 49 }; | 47 }; |
| 50 | 48 |
| 51 } // namespace shell | 49 } // namespace shell |
| 52 } // namespace sky | 50 } // namespace sky |
| 53 | 51 |
| 54 #endif // SKY_SHELL_SHELL_H_ | 52 #endif // SKY_SHELL_SHELL_H_ |
| OLD | NEW |