Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / mojo / services / public / cpp / view_manager / lib / view_private.h
index 9173688..a27a963 100644 (file)
 
 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_; }
@@ -29,6 +36,10 @@ class ViewPrivate {
     view_->manager_ = manager;
   }
 
+  void set_properties(const std::map<std::string, std::vector<uint8_t>>& data) {
+    view_->properties_ = data;
+  }
+
   void LocalDestroy() {
     view_->LocalDestroy();
   }
@@ -41,10 +52,11 @@ class ViewPrivate {
   void LocalReorder(View* relative, OrderDirection direction) {
     view_->LocalReorder(relative, direction);
   }
-  void LocalSetBounds(const gfx::Rect& old_bounds,
-                      const gfx::Rect& new_bounds) {
+  void LocalSetBounds(const Rect& old_bounds,
+                      const Rect& new_bounds) {
     view_->LocalSetBounds(old_bounds, new_bounds);
   }
+  void LocalSetDrawn(bool drawn) { view_->LocalSetDrawn(drawn); }
 
  private:
   View* view_;