Index: mojo/services/public/cpp/view_manager/lib/view_private.h |
diff --git a/mojo/services/public/cpp/view_manager/lib/view_private.h b/mojo/services/public/cpp/view_manager/lib/view_private.h |
index 91736885fb9beb679fdeb01ebc3536cd436ff27a..73138e2867516862bb4a474303a6fd6a7e378976 100644 |
--- a/mojo/services/public/cpp/view_manager/lib/view_private.h |
+++ b/mojo/services/public/cpp/view_manager/lib/view_private.h |
@@ -11,17 +11,24 @@ |
namespace mojo { |
+// This class is a friend of a View and contains functions to mutate internal |
+// state of View. |
class ViewPrivate { |
public: |
explicit ViewPrivate(View* view); |
~ViewPrivate(); |
+ // Creates and returns a new View. Caller owns the return value. |
static View* LocalCreate(); |
ObserverList<ViewObserver>* observers() { return &view_->observers_; } |
void ClearParent() { view_->parent_ = NULL; } |
+ void set_visible(bool visible) { view_->visible_ = visible; } |
+ |
+ void set_drawn(bool drawn) { view_->drawn_ = drawn; } |
+ |
void set_id(Id id) { view_->id_ = id; } |
ViewManager* view_manager() { return view_->manager_; } |
@@ -45,6 +52,7 @@ class ViewPrivate { |
const gfx::Rect& new_bounds) { |
view_->LocalSetBounds(old_bounds, new_bounds); |
} |
+ void LocalSetDrawn(bool drawn) { view_->LocalSetDrawn(drawn); } |
private: |
View* view_; |