Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 SERVICES_VIEW_MANAGER_SERVER_VIEW_H_ | 5 #ifndef SERVICES_VIEW_MANAGER_SERVER_VIEW_H_ |
| 6 #define SERVICES_VIEW_MANAGER_SERVER_VIEW_H_ | 6 #define SERVICES_VIEW_MANAGER_SERVER_VIEW_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 22 matching lines...) Expand all Loading... | |
| 33 | 33 |
| 34 void Add(ServerView* child); | 34 void Add(ServerView* child); |
| 35 void Remove(ServerView* child); | 35 void Remove(ServerView* child); |
| 36 void Reorder(ServerView* child, | 36 void Reorder(ServerView* child, |
| 37 ServerView* relative, | 37 ServerView* relative, |
| 38 mojo::OrderDirection direction); | 38 mojo::OrderDirection direction); |
| 39 | 39 |
| 40 const gfx::Rect& bounds() const { return bounds_; } | 40 const gfx::Rect& bounds() const { return bounds_; } |
| 41 void SetBounds(const gfx::Rect& bounds); | 41 void SetBounds(const gfx::Rect& bounds); |
| 42 | 42 |
| 43 const mojo::ViewportMetrics& viewport_metrics() { return *viewport_metrics_; } | |
|
sky
2015/01/27 23:40:23
Since we currently only support metrics on the roo
| |
| 44 void SetViewportMetrics(const mojo::ViewportMetrics& metrics); | |
| 45 | |
| 43 const ServerView* parent() const { return parent_; } | 46 const ServerView* parent() const { return parent_; } |
| 44 ServerView* parent() { return parent_; } | 47 ServerView* parent() { return parent_; } |
| 45 | 48 |
| 46 const ServerView* GetRoot() const; | 49 const ServerView* GetRoot() const; |
| 47 ServerView* GetRoot() { | 50 ServerView* GetRoot() { |
| 48 return const_cast<ServerView*>( | 51 return const_cast<ServerView*>( |
| 49 const_cast<const ServerView*>(this)->GetRoot()); | 52 const_cast<const ServerView*>(this)->GetRoot()); |
| 50 } | 53 } |
| 51 | 54 |
| 52 std::vector<const ServerView*> GetChildren() const; | 55 std::vector<const ServerView*> GetChildren() const; |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 88 | 91 |
| 89 // Implementation of removing a view. Doesn't send any notification. | 92 // Implementation of removing a view. Doesn't send any notification. |
| 90 void RemoveImpl(ServerView* view); | 93 void RemoveImpl(ServerView* view); |
| 91 | 94 |
| 92 ServerViewDelegate* delegate_; | 95 ServerViewDelegate* delegate_; |
| 93 const ViewId id_; | 96 const ViewId id_; |
| 94 ServerView* parent_; | 97 ServerView* parent_; |
| 95 Views children_; | 98 Views children_; |
| 96 bool visible_; | 99 bool visible_; |
| 97 gfx::Rect bounds_; | 100 gfx::Rect bounds_; |
| 101 mojo::ViewportMetricsPtr viewport_metrics_; | |
| 98 cc::SurfaceId surface_id_; | 102 cc::SurfaceId surface_id_; |
| 99 float opacity_; | 103 float opacity_; |
| 100 gfx::Transform transform_; | 104 gfx::Transform transform_; |
| 101 | 105 |
| 102 std::map<std::string, std::vector<uint8_t>> properties_; | 106 std::map<std::string, std::vector<uint8_t>> properties_; |
| 103 | 107 |
| 104 DISALLOW_COPY_AND_ASSIGN(ServerView); | 108 DISALLOW_COPY_AND_ASSIGN(ServerView); |
| 105 }; | 109 }; |
| 106 | 110 |
| 107 } // namespace view_manager | 111 } // namespace view_manager |
| 108 | 112 |
| 109 #endif // SERVICES_VIEW_MANAGER_SERVER_VIEW_H_ | 113 #endif // SERVICES_VIEW_MANAGER_SERVER_VIEW_H_ |
| OLD | NEW |