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

Unified Diff: ui/views/view.cc

Issue 8909002: views: Convert IsEnabled() to just enabled() since it's just a simple accessor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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
« no previous file with comments | « ui/views/view.h ('k') | ui/views/widget/drop_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/view.cc
diff --git a/ui/views/view.cc b/ui/views/view.cc
index 917937590c8dacd304a0c2e96bc7e32f546f38f6..dcd95a2d85833b7266c1c6aec8ab8871d266a06e 100644
--- a/ui/views/view.cc
+++ b/ui/views/view.cc
@@ -413,10 +413,6 @@ void View::SetEnabled(bool enabled) {
}
}
-bool View::IsEnabled() const {
- return enabled_;
-}
-
void View::OnEnabledChanged() {
SchedulePaint();
}
@@ -907,7 +903,7 @@ bool View::IsFocusableInRootView() const {
}
bool View::IsAccessibilityFocusableInRootView() const {
- return (focusable_ || accessibility_focusable_) && IsEnabled() &&
+ return (focusable_ || accessibility_focusable_) && enabled_ &&
IsVisibleInRootView();
}
@@ -1239,7 +1235,7 @@ void View::GetHitTestMask(gfx::Path* mask) const {
// Focus -----------------------------------------------------------------------
bool View::IsFocusable() const {
- return focusable_ && IsEnabled() && IsVisible();
+ return focusable_ && enabled_ && IsVisible();
}
void View::OnFocus() {
@@ -1851,9 +1847,8 @@ void View::DestroyLayer() {
// Input -----------------------------------------------------------------------
bool View::ProcessMousePressed(const MouseEvent& event, DragInfo* drag_info) {
- const bool enabled = IsEnabled();
int drag_operations =
- (enabled && event.IsOnlyLeftMouseButton() && HitTest(event.location())) ?
+ (enabled_ && event.IsOnlyLeftMouseButton() && HitTest(event.location())) ?
GetDragOperations(event.location()) : 0;
ContextMenuController* context_menu_controller = event.IsRightMouseButton() ?
context_menu_controller_ : 0;
@@ -1861,7 +1856,7 @@ bool View::ProcessMousePressed(const MouseEvent& event, DragInfo* drag_info) {
const bool result = OnMousePressed(event);
// WARNING: we may have been deleted, don't use any View variables.
- if (!enabled)
+ if (!enabled_)
return result;
if (drag_operations != ui::DragDropTypes::DRAG_NONE) {
« no previous file with comments | « ui/views/view.h ('k') | ui/views/widget/drop_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698