Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(496)

Side by Side Diff: sky/shell/shell.h

Issue 936883002: Connect Sky and Ganesh in SkyShell (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Address review comments Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « sky/shell/platform_view.cc ('k') | sky/shell/shell.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 12
12 namespace base { 13 namespace base {
13 class Thread;
14 class SingleThreadTaskRunner; 14 class SingleThreadTaskRunner;
15 } 15 }
16 16
17 namespace sky { 17 namespace sky {
18 namespace shell { 18 namespace shell {
19 class Engine; 19 class Engine;
20 class Rasterizer; 20 class Rasterizer;
21 class SkyView; 21 class PlatformView;
22 22
23 class Shell { 23 class Shell {
24 public: 24 public:
25 explicit Shell(scoped_refptr<base::SingleThreadTaskRunner> java_task_runner);
26 ~Shell(); 25 ~Shell();
27 26
28 void Init(); 27 static void Init(
28 scoped_refptr<base::SingleThreadTaskRunner> java_task_runner);
29 static Shell& Shared();
30
31 PlatformView* view() const { return view_.get(); }
29 32
30 private: 33 private:
34 explicit Shell(scoped_refptr<base::SingleThreadTaskRunner> java_task_runner);
35
36 void InitGPU(const base::Thread::Options& options);
37 void InitUI(const base::Thread::Options& options);
38 void InitView();
39
31 scoped_refptr<base::SingleThreadTaskRunner> java_task_runner_; 40 scoped_refptr<base::SingleThreadTaskRunner> java_task_runner_;
32 scoped_ptr<base::Thread> gpu_thread_; 41 scoped_ptr<base::Thread> gpu_thread_;
33 scoped_ptr<base::Thread> ui_thread_; 42 scoped_ptr<base::Thread> ui_thread_;
34 43
35 scoped_ptr<SkyView> view_; 44 scoped_ptr<PlatformView> view_;
36 scoped_ptr<Rasterizer> rasterizer_; 45 scoped_ptr<Rasterizer> rasterizer_;
37 scoped_ptr<Engine> engine_; 46 scoped_ptr<Engine> engine_;
38 47
39 DISALLOW_COPY_AND_ASSIGN(Shell); 48 DISALLOW_COPY_AND_ASSIGN(Shell);
40 }; 49 };
41 50
42 } // namespace shell 51 } // namespace shell
43 } // namespace sky 52 } // namespace sky
44 53
45 #endif // SKY_SHELL_SHELL_H_ 54 #endif // SKY_SHELL_SHELL_H_
OLDNEW
« no previous file with comments | « sky/shell/platform_view.cc ('k') | sky/shell/shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698