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

Unified Diff: sky/shell/shell.h

Issue 1187503003: Refactor SkyShell to allow multiple SkyViews (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: s/instance/sky_shell/ Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/shell/platform_view.h ('k') | sky/shell/shell.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/shell/shell.h
diff --git a/sky/shell/shell.h b/sky/shell/shell.h
index 558468d17eaa55a22a81fe0078cc9c45a2dc255b..36004da88329a8e2adc41ce650c1253d45736054 100644
--- a/sky/shell/shell.h
+++ b/sky/shell/shell.h
@@ -8,13 +8,12 @@
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
+#include "base/message_loop/message_loop.h"
#include "base/threading/thread.h"
+#include "sky/shell/service_provider.h"
namespace sky {
namespace shell {
-class Engine;
-class PlatformView;
-class Rasterizer;
class ServiceProviderContext;
class Shell {
@@ -25,22 +24,26 @@ class Shell {
scoped_ptr<ServiceProviderContext> service_provider_context);
static Shell& Shared();
- PlatformView* view() const { return view_.get(); }
+ scoped_refptr<base::SingleThreadTaskRunner> gpu_task_runner() const {
+ return gpu_thread_->message_loop()->task_runner();
+ }
+
+ scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner() const {
+ return ui_thread_->message_loop()->task_runner();
+ }
+
+ ServiceProviderContext* service_provider_context() const {
+ return service_provider_context_.get();
+ }
private:
explicit Shell(scoped_ptr<ServiceProviderContext> service_provider_context);
void InitGPU(const base::Thread::Options& options);
void InitUI(const base::Thread::Options& options);
- void InitView();
scoped_ptr<base::Thread> gpu_thread_;
scoped_ptr<base::Thread> ui_thread_;
-
- scoped_ptr<PlatformView> view_;
- scoped_ptr<Rasterizer> rasterizer_;
- scoped_ptr<Engine> engine_;
-
scoped_ptr<ServiceProviderContext> service_provider_context_;
DISALLOW_COPY_AND_ASSIGN(Shell);
« no previous file with comments | « sky/shell/platform_view.h ('k') | sky/shell/shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698