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

Unified Diff: ui/v2/src/view_private.h

Issue 25757007: V2: Implement reparenting, bounds and visibility change notifications, and write more tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 2 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
« no previous file with comments | « ui/v2/src/view.cc ('k') | ui/v2/src/view_private.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/v2/src/view_private.h
diff --git a/ui/v2/src/view_private.h b/ui/v2/src/view_private.h
new file mode 100644
index 0000000000000000000000000000000000000000..d59a34e8545a6483bf6d4da91a4ba5c5cd06558b
--- /dev/null
+++ b/ui/v2/src/view_private.h
@@ -0,0 +1,40 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_V2_SRC_VIEW_PRIVATE_H_
+#define UI_V2_SRC_VIEW_PRIVATE_H_
+
+#include "base/observer_list.h"
+#include "ui/v2/public/view.h"
+
+namespace gfx {
+class Rect;
+}
+
+namespace v2 {
+
+class ViewObserver;
+
+// Friend of View. Provides a way to access view state for the implementation
+// of class View.
+class ViewPrivate {
sky 2013/10/03 21:28:19 One disadvantage of this approach vs what we have
+ public:
+ explicit ViewPrivate(View* view);
+ ~ViewPrivate();
+
+ ObserverList<ViewObserver>* observers() { return &view_->observers_; }
+
+ void ClearParent() { view_->parent_ = NULL; }
+
+ void set_bounds(const gfx::Rect& bounds) { view_->bounds_ = bounds; }
+
+ private:
+ View* view_;
+
+ DISALLOW_COPY_AND_ASSIGN(ViewPrivate);
+};
+
+} // namespace v2
+
+#endif // UI_V2_SRC_VIEW_PRIVATE_H_
« no previous file with comments | « ui/v2/src/view.cc ('k') | ui/v2/src/view_private.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698