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

Unified Diff: views/view.cc

Issue 6976048: views: Add OnEnabledChanged() method to View class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove bool parameter Created 9 years, 7 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
« views/view.h ('K') | « views/view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/view.cc
diff --git a/views/view.cc b/views/view.cc
index cfae12610f2a849c109ae9c97d14c8a2f1a0c1c0..927f9d2f45dc5ac3d15151934dcbbaf60672e4af 100644
--- a/views/view.cc
+++ b/views/view.cc
@@ -381,10 +381,10 @@ bool View::IsVisibleInRootView() const {
return IsVisible() && parent() ? parent()->IsVisibleInRootView() : false;
}
-void View::SetEnabled(bool state) {
- if (enabled_ != state) {
- enabled_ = state;
- SchedulePaint();
+void View::SetEnabled(bool enabled) {
+ if (enabled_ != enabled) {
+ enabled_ = enabled;
+ OnEnabledChanged();
}
}
@@ -392,6 +392,10 @@ bool View::IsEnabled() const {
return enabled_;
}
+void View::OnEnabledChanged() {
+ SchedulePaint();
+}
+
// Transformations -------------------------------------------------------------
const ui::Transform& View::GetTransform() const {
« views/view.h ('K') | « views/view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698