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

Unified Diff: examples/ui/shapes/shapes_view.h

Issue 1559723002: Update the UI examples. (Closed) Base URL: git@github.com:domokit/mojo.git@moz-14
Patch Set: address feedback Created 4 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
« no previous file with comments | « examples/ui/shapes/shapes_app.cc ('k') | examples/ui/shapes/shapes_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: examples/ui/shapes/shapes_view.h
diff --git a/examples/ui/shapes/shapes_view.h b/examples/ui/shapes/shapes_view.h
new file mode 100644
index 0000000000000000000000000000000000000000..d041f7e37aaaba4a07067f9fefa8b300a71af8e1
--- /dev/null
+++ b/examples/ui/shapes/shapes_view.h
@@ -0,0 +1,38 @@
+// 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 EXAMPLES_UI_SHAPES_SHAPES_VIEW_H_
+#define EXAMPLES_UI_SHAPES_SHAPES_VIEW_H_
+
+#include "mojo/ui/ganesh_view.h"
+
+class SkCanvas;
+
+namespace examples {
+
+class ShapesView : public mojo::ui::GaneshView {
+ public:
+ ShapesView(
+ mojo::ApplicationImpl* app_impl,
+ const mojo::ui::ViewProvider::CreateViewCallback& create_view_callback);
+
+ ~ShapesView() override;
+
+ private:
+ // |GaneshView|:
+ void OnLayout(mojo::ui::ViewLayoutParamsPtr layout_params,
+ mojo::Array<uint32_t> children_needing_layout,
+ const OnLayoutCallback& callback) override;
+
+ void UpdateScene();
+ void DrawContent(SkCanvas* canvas);
+
+ mojo::Size size_;
+
+ DISALLOW_COPY_AND_ASSIGN(ShapesView);
+};
+
+} // namespace examples
+
+#endif // EXAMPLES_UI_SHAPES_SHAPES_VIEW_H_
« no previous file with comments | « examples/ui/shapes/shapes_app.cc ('k') | examples/ui/shapes/shapes_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698