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

Side by Side Diff: examples/ui/shapes/shapes_view.h

Issue 1679023006: Reify view ownership as a message pipe. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 4 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 | « examples/ui/shapes/shapes_app.cc ('k') | examples/ui/shapes/shapes_view.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 EXAMPLES_UI_SHAPES_SHAPES_VIEW_H_ 5 #ifndef EXAMPLES_UI_SHAPES_SHAPES_VIEW_H_
6 #define EXAMPLES_UI_SHAPES_SHAPES_VIEW_H_ 6 #define EXAMPLES_UI_SHAPES_SHAPES_VIEW_H_
7 7
8 #include "mojo/ui/ganesh_view.h" 8 #include "mojo/ui/ganesh_view.h"
9 9
10 class SkCanvas; 10 class SkCanvas;
11 11
12 namespace examples { 12 namespace examples {
13 13
14 class ShapesView : public mojo::ui::GaneshView { 14 class ShapesView : public mojo::ui::GaneshView {
15 public: 15 public:
16 ShapesView( 16 ShapesView(mojo::ApplicationImpl* app_impl,
17 mojo::ApplicationImpl* app_impl, 17 mojo::InterfaceRequest<mojo::ui::ViewOwner> view_owner_request);
18 const mojo::ui::ViewProvider::CreateViewCallback& create_view_callback);
19 18
20 ~ShapesView() override; 19 ~ShapesView() override;
21 20
22 private: 21 private:
23 // |GaneshView|: 22 // |GaneshView|:
24 void OnLayout(mojo::ui::ViewLayoutParamsPtr layout_params, 23 void OnLayout(mojo::ui::ViewLayoutParamsPtr layout_params,
25 mojo::Array<uint32_t> children_needing_layout, 24 mojo::Array<uint32_t> children_needing_layout,
26 const OnLayoutCallback& callback) override; 25 const OnLayoutCallback& callback) override;
27 26
28 void UpdateScene(); 27 void UpdateScene();
29 void DrawContent(SkCanvas* canvas); 28 void DrawContent(SkCanvas* canvas);
30 29
31 mojo::Size size_; 30 mojo::Size size_;
32 31
33 DISALLOW_COPY_AND_ASSIGN(ShapesView); 32 DISALLOW_COPY_AND_ASSIGN(ShapesView);
34 }; 33 };
35 34
36 } // namespace examples 35 } // namespace examples
37 36
38 #endif // EXAMPLES_UI_SHAPES_SHAPES_VIEW_H_ 37 #endif // EXAMPLES_UI_SHAPES_SHAPES_VIEW_H_
OLDNEW
« 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