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

Side by Side Diff: ui/views/view.h

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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/views/controls/textfield/textfield.cc ('k') | ui/views/view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_VIEWS_VIEW_H_ 5 #ifndef UI_VIEWS_VIEW_H_
6 #define UI_VIEWS_VIEW_H_ 6 #define UI_VIEWS_VIEW_H_
7 #pragma once 7 #pragma once
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <map> 10 #include <map>
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 // Return whether a view and its ancestors are visible. Returns true if the 251 // Return whether a view and its ancestors are visible. Returns true if the
252 // path from this view to the root view is visible. 252 // path from this view to the root view is visible.
253 virtual bool IsVisibleInRootView() const; 253 virtual bool IsVisibleInRootView() const;
254 254
255 // Set whether this view is enabled. A disabled view does not receive keyboard 255 // Set whether this view is enabled. A disabled view does not receive keyboard
256 // or mouse inputs. If flag differs from the current value, SchedulePaint is 256 // or mouse inputs. If flag differs from the current value, SchedulePaint is
257 // invoked. 257 // invoked.
258 void SetEnabled(bool enabled); 258 void SetEnabled(bool enabled);
259 259
260 // Returns whether the view is enabled. 260 // Returns whether the view is enabled.
261 virtual bool IsEnabled() const; 261 bool enabled() const { return enabled_; }
262 262
263 // This indicates that the view completely fills its bounds in an opaque 263 // This indicates that the view completely fills its bounds in an opaque
264 // color. This doesn't affect compositing but is a hint to the compositor to 264 // color. This doesn't affect compositing but is a hint to the compositor to
265 // optimize painting. 265 // optimize painting.
266 // Note that this method does not implicitly create a layer if one does not 266 // Note that this method does not implicitly create a layer if one does not
267 // already exist for the View, but is a no-op in that case. 267 // already exist for the View, but is a no-op in that case.
268 void SetFillsBoundsOpaquely(bool fills_bounds_opaquely); 268 void SetFillsBoundsOpaquely(bool fills_bounds_opaquely);
269 269
270 // Transformations ----------------------------------------------------------- 270 // Transformations -----------------------------------------------------------
271 271
(...skipping 1159 matching lines...) Expand 10 before | Expand all | Expand 10 after
1431 base::win::ScopedComPtr<NativeViewAccessibilityWin> 1431 base::win::ScopedComPtr<NativeViewAccessibilityWin>
1432 native_view_accessibility_win_; 1432 native_view_accessibility_win_;
1433 #endif 1433 #endif
1434 1434
1435 DISALLOW_COPY_AND_ASSIGN(View); 1435 DISALLOW_COPY_AND_ASSIGN(View);
1436 }; 1436 };
1437 1437
1438 } // namespace views 1438 } // namespace views
1439 1439
1440 #endif // UI_VIEWS_VIEW_H_ 1440 #endif // UI_VIEWS_VIEW_H_
OLDNEW
« no previous file with comments | « ui/views/controls/textfield/textfield.cc ('k') | ui/views/view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698