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

Unified Diff: third_party/mojo_services/src/view_manager/public/cpp/lib/view.cc

Issue 954643002: Update mojo sdk to rev 3d23dae011859a2aae49f1d1adde705c8e85d819 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: use run_renderer_in_process() Created 5 years, 10 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: third_party/mojo_services/src/view_manager/public/cpp/lib/view.cc
diff --git a/third_party/mojo_services/src/view_manager/public/cpp/lib/view.cc b/third_party/mojo_services/src/view_manager/public/cpp/lib/view.cc
index 1e8b2b03d298df9218b03b7d5d4be826e1d822b7..9ed458c7ffae0f6eae26d382ab4f4669e1816c76 100644
--- a/third_party/mojo_services/src/view_manager/public/cpp/lib/view.cc
+++ b/third_party/mojo_services/src/view_manager/public/cpp/lib/view.cc
@@ -77,7 +77,7 @@ class ScopedTreeNotifier {
private:
ViewObserver::TreeChangeParams params_;
- DISALLOW_COPY_AND_ASSIGN(ScopedTreeNotifier);
+ MOJO_DISALLOW_COPY_AND_ASSIGN(ScopedTreeNotifier);
};
void RemoveChildImpl(View* child, View::Children* children) {
@@ -112,7 +112,7 @@ class ScopedOrderChangedNotifier {
View* relative_view_;
OrderDirection direction_;
- DISALLOW_COPY_AND_ASSIGN(ScopedOrderChangedNotifier);
+ MOJO_DISALLOW_COPY_AND_ASSIGN(ScopedOrderChangedNotifier);
};
// Returns true if the order actually changed.
@@ -168,7 +168,7 @@ class ScopedSetBoundsNotifier {
const Rect old_bounds_;
const Rect new_bounds_;
- DISALLOW_COPY_AND_ASSIGN(ScopedSetBoundsNotifier);
+ MOJO_DISALLOW_COPY_AND_ASSIGN(ScopedSetBoundsNotifier);
};
// Some operations are only permitted in the connection that created the view.
@@ -220,9 +220,7 @@ void View::SetVisible(bool value) {
if (manager_)
static_cast<ViewManagerClientImpl*>(manager_)->SetVisible(id_, value);
- FOR_EACH_OBSERVER(ViewObserver, observers_, OnViewVisibilityChanging(this));
- visible_ = value;
- NotifyViewVisibilityChanged(this);
+ LocalSetVisible(value);
}
void View::SetSharedProperty(const std::string& name,
@@ -531,6 +529,15 @@ void View::LocalSetDrawn(bool value) {
FOR_EACH_OBSERVER(ViewObserver, observers_, OnViewDrawnChanged(this));
}
+void View::LocalSetVisible(bool visible) {
+ if (visible_ == visible)
+ return;
+
+ FOR_EACH_OBSERVER(ViewObserver, observers_, OnViewVisibilityChanging(this));
+ visible_ = visible;
+ NotifyViewVisibilityChanged(this);
+}
+
void View::NotifyViewVisibilityChanged(View* target) {
if (!NotifyViewVisibilityChangedDown(target)) {
return; // |this| has been deleted.

Powered by Google App Engine
This is Rietveld 408576698