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

Unified Diff: mojo/services/public/cpp/view_manager/view_tree_node.h

Issue 287053004: SetBounds for ViewTreeNode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 7 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
Index: mojo/services/public/cpp/view_manager/view_tree_node.h
diff --git a/mojo/services/public/cpp/view_manager/view_tree_node.h b/mojo/services/public/cpp/view_manager/view_tree_node.h
index 695b4501aeaeeec08e3fa17f4c426f35027ce8bb..a5d9b360fc3fac17e7c338a852210c1ec325481a 100644
--- a/mojo/services/public/cpp/view_manager/view_tree_node.h
+++ b/mojo/services/public/cpp/view_manager/view_tree_node.h
@@ -10,6 +10,7 @@
#include "base/basictypes.h"
#include "base/observer_list.h"
#include "mojo/services/public/cpp/view_manager/view_manager_types.h"
+#include "ui/gfx/geometry/rect.h"
namespace mojo {
namespace view_manager {
@@ -34,6 +35,10 @@ class ViewTreeNode {
// Configuration.
TransportNodeId id() const { return id_; }
+ // Geometric disposition.
+ const gfx::Rect& bounds() { return bounds_; }
+ void SetBounds(const gfx::Rect& bounds);
+
// Observation.
void AddObserver(ViewTreeNodeObserver* observer);
void RemoveObserver(ViewTreeNodeObserver* observer);
@@ -68,6 +73,7 @@ class ViewTreeNode {
void LocalAddChild(ViewTreeNode* child);
void LocalRemoveChild(ViewTreeNode* child);
void LocalSetActiveView(View* view);
+ void LocalSetBounds(const gfx::Rect& old_bounds, const gfx::Rect& new_bounds);
ViewManager* manager_;
TransportNodeId id_;
@@ -76,6 +82,7 @@ class ViewTreeNode {
ObserverList<ViewTreeNodeObserver> observers_;
+ gfx::Rect bounds_;
View* active_view_;
DISALLOW_COPY_AND_ASSIGN(ViewTreeNode);

Powered by Google App Engine
This is Rietveld 408576698