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

Unified Diff: sky/shell/shell.h

Issue 890803004: SkyShell should be able to draw a green square with GL (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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
Index: sky/shell/shell.h
diff --git a/sky/shell/shell.h b/sky/shell/shell.h
new file mode 100644
index 0000000000000000000000000000000000000000..fdf65f959a22cdc88fb87b3a8dce1b67d96d1cf7
--- /dev/null
+++ b/sky/shell/shell.h
@@ -0,0 +1,46 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef SKY_SHELL_SHELL_H_
+#define SKY_SHELL_SHELL_H_
+
+#include "base/macros.h"
+#include "base/memory/ref_counted.h"
+#include "base/memory/scoped_ptr.h"
+#include "sky/shell/gpu_driver.h"
+#include "sky/shell/sky_view.h"
+
+namespace base {
+class Thread;
+class SingleThreadTaskRunner;
+}
+
+namespace sky {
+namespace shell {
+class SkyView;
+
+class Shell : public SkyView::Delegate {
+ public:
+ explicit Shell(scoped_refptr<base::SingleThreadTaskRunner> java_task_runner);
+ ~Shell();
+
+ void Init();
+
+ private:
+ void OnAcceleratedWidgetAvailable(gfx::AcceleratedWidget widget) override;
+ void OnDestroyed() override;
+
+ scoped_refptr<base::SingleThreadTaskRunner> java_task_runner_;
+ scoped_ptr<base::Thread> gpu_thread_;
+
+ scoped_ptr<SkyView> view_;
+ scoped_ptr<GPUDriver> gpu_driver_;
+
+ DISALLOW_COPY_AND_ASSIGN(Shell);
+};
+
+} // namespace shell
+} // namespace sky
+
+#endif // SKY_SHELL_SHELL_H_

Powered by Google App Engine
This is Rietveld 408576698