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

Side by Side Diff: mojo/services/view_manager/public/cpp/lib/view_private.h

Issue 880743002: Plumb ViewportMetrics change notifications around the world and back. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Fix typo Created 5 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 MOJO_SERVICES_VIEW_MANAGER_PUBLIC_CPP_LIB_VIEW_PRIVATE_H_ 5 #ifndef MOJO_SERVICES_VIEW_MANAGER_PUBLIC_CPP_LIB_VIEW_PRIVATE_H_
6 #define MOJO_SERVICES_VIEW_MANAGER_PUBLIC_CPP_LIB_VIEW_PRIVATE_H_ 6 #define MOJO_SERVICES_VIEW_MANAGER_PUBLIC_CPP_LIB_VIEW_PRIVATE_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 9
10 #include "view_manager/public/cpp/view.h" 10 #include "view_manager/public/cpp/view.h"
(...skipping 21 matching lines...) Expand all
32 void set_id(Id id) { view_->id_ = id; } 32 void set_id(Id id) { view_->id_ = id; }
33 33
34 void set_view_manager(ViewManager* manager) { 34 void set_view_manager(ViewManager* manager) {
35 view_->manager_ = manager; 35 view_->manager_ = manager;
36 } 36 }
37 37
38 void set_properties(const std::map<std::string, std::vector<uint8_t>>& data) { 38 void set_properties(const std::map<std::string, std::vector<uint8_t>>& data) {
39 view_->properties_ = data; 39 view_->properties_ = data;
40 } 40 }
41 41
42 void set_viewport_metrics(ViewportMetricsPtr viewport_metrics) { 42 void LocalSetViewportMetrics(const ViewportMetrics& old_metrics,
43 view_->viewport_metrics_ = viewport_metrics.Pass(); 43 const ViewportMetrics& new_metrics) {
44 view_->LocalSetViewportMetrics(new_metrics, new_metrics);
44 } 45 }
45 46
46 void LocalDestroy() { 47 void LocalDestroy() {
47 view_->LocalDestroy(); 48 view_->LocalDestroy();
48 } 49 }
49 void LocalAddChild(View* child) { 50 void LocalAddChild(View* child) {
50 view_->LocalAddChild(child); 51 view_->LocalAddChild(child);
51 } 52 }
52 void LocalRemoveChild(View* child) { 53 void LocalRemoveChild(View* child) {
53 view_->LocalRemoveChild(child); 54 view_->LocalRemoveChild(child);
54 } 55 }
55 void LocalReorder(View* relative, OrderDirection direction) { 56 void LocalReorder(View* relative, OrderDirection direction) {
56 view_->LocalReorder(relative, direction); 57 view_->LocalReorder(relative, direction);
57 } 58 }
58 void LocalSetBounds(const Rect& old_bounds, 59 void LocalSetBounds(const Rect& old_bounds,
59 const Rect& new_bounds) { 60 const Rect& new_bounds) {
60 view_->LocalSetBounds(old_bounds, new_bounds); 61 view_->LocalSetBounds(old_bounds, new_bounds);
61 } 62 }
62 void LocalSetDrawn(bool drawn) { view_->LocalSetDrawn(drawn); } 63 void LocalSetDrawn(bool drawn) { view_->LocalSetDrawn(drawn); }
63 64
64 private: 65 private:
65 View* view_; 66 View* view_;
66 67
67 DISALLOW_COPY_AND_ASSIGN(ViewPrivate); 68 DISALLOW_COPY_AND_ASSIGN(ViewPrivate);
68 }; 69 };
69 70
70 } // namespace mojo 71 } // namespace mojo
71 72
72 #endif // MOJO_SERVICES_VIEW_MANAGER_PUBLIC_CPP_LIB_VIEW_PRIVATE_H_ 73 #endif // MOJO_SERVICES_VIEW_MANAGER_PUBLIC_CPP_LIB_VIEW_PRIVATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698