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

Side by Side Diff: examples/ui/tile/tile_view.h

Issue 1782733002: Mozart: The great RectF-ication. (Closed) Base URL: git@github.com:domokit/mojo.git@moz-9
Patch Set: rebase Created 4 years, 9 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/spinning_cube/spinning_cube_view.cc ('k') | examples/ui/tile/tile_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_TILE_TILE_VIEW_H_ 5 #ifndef EXAMPLES_UI_TILE_TILE_VIEW_H_
6 #define EXAMPLES_UI_TILE_TILE_VIEW_H_ 6 #define EXAMPLES_UI_TILE_TILE_VIEW_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 10
(...skipping 14 matching lines...) Expand all
25 struct ViewData { 25 struct ViewData {
26 explicit ViewData(const std::string& url, uint32_t key); 26 explicit ViewData(const std::string& url, uint32_t key);
27 ~ViewData(); 27 ~ViewData();
28 28
29 const std::string url; 29 const std::string url;
30 const uint32_t key; 30 const uint32_t key;
31 31
32 bool layout_pending; 32 bool layout_pending;
33 mojo::ui::ViewLayoutParamsPtr layout_params; 33 mojo::ui::ViewLayoutParamsPtr layout_params;
34 mojo::ui::ViewLayoutInfoPtr layout_info; 34 mojo::ui::ViewLayoutInfoPtr layout_info;
35 mojo::Rect layout_bounds; 35 mojo::RectF layout_bounds;
36 }; 36 };
37 37
38 // |BaseView|: 38 // |BaseView|:
39 void OnLayout(mojo::ui::ViewLayoutParamsPtr layout_params, 39 void OnLayout(mojo::ui::ViewLayoutParamsPtr layout_params,
40 mojo::Array<uint32_t> children_needing_layout, 40 mojo::Array<uint32_t> children_needing_layout,
41 const OnLayoutCallback& callback) override; 41 const OnLayoutCallback& callback) override;
42 void OnChildUnavailable(uint32_t child_key, 42 void OnChildUnavailable(uint32_t child_key,
43 const OnChildUnavailableCallback& callback) override; 43 const OnChildUnavailableCallback& callback) override;
44 44
45 void ConnectViews(); 45 void ConnectViews();
46 void OnChildLayoutFinished(uint32_t child_key, 46 void OnChildLayoutFinished(uint32_t child_key,
47 mojo::ui::ViewLayoutInfoPtr child_layout_info); 47 mojo::ui::ViewLayoutInfoPtr child_layout_info);
48 void FinishLayout(); 48 void FinishLayout();
49 49
50 void OnFrameSubmitted(); 50 void OnFrameSubmitted();
51 51
52 std::vector<std::string> view_urls_; 52 std::vector<std::string> view_urls_;
53 std::map<uint32_t, std::unique_ptr<ViewData>> views_; 53 std::map<uint32_t, std::unique_ptr<ViewData>> views_;
54 54
55 mojo::Size size_; 55 mojo::Size size_;
56 OnLayoutCallback pending_layout_callback_; 56 OnLayoutCallback pending_layout_callback_;
57 uint32_t pending_child_layout_count_ = 0u; 57 uint32_t pending_child_layout_count_ = 0u;
58 58
59 DISALLOW_COPY_AND_ASSIGN(TileView); 59 DISALLOW_COPY_AND_ASSIGN(TileView);
60 }; 60 };
61 61
62 } // namespace examples 62 } // namespace examples
63 63
64 #endif // EXAMPLES_UI_TILE_TILE_VIEW_H_ 64 #endif // EXAMPLES_UI_TILE_TILE_VIEW_H_
OLDNEW
« no previous file with comments | « examples/ui/spinning_cube/spinning_cube_view.cc ('k') | examples/ui/tile/tile_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698