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_ |