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

Unified Diff: mojo/services/public/cpp/view_manager/lib/view_private.h

Issue 621903004: Adds View::visible() and IsDrawn (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cleanup Created 6 years, 3 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/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_;

Powered by Google App Engine
This is Rietveld 408576698