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

Unified Diff: views/view.h

Issue 6622002: Do all OOLing in the views code. linux_views now builds clean with the clang plugin. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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: views/view.h
diff --git a/views/view.h b/views/view.h
index 83af008740e7d13a2ef6e0c5066e87fbed933591..569002346a915570fc6aef63bba4191e81287f97 100644
--- a/views/view.h
+++ b/views/view.h
@@ -153,13 +153,13 @@ class View : public AcceleratorTarget {
// TODO(beng): delete
// Returns whether the view is hot-tracked.
- virtual bool IsHotTracked() const { return false; }
+ virtual bool IsHotTracked() const;
// FATE TBD ------------------------------------------------------------------
// TODO(beng): Figure out what these methods are for and delete them.
// TODO(beng): this one isn't even google3-style. wth.
- virtual Widget* child_widget() { return NULL; }
+ virtual Widget* child_widget();
// Creation and lifetime -----------------------------------------------------
@@ -308,7 +308,7 @@ class View : public AcceleratorTarget {
virtual void SetVisible(bool flag);
// Return whether a view is visible
- virtual bool IsVisible() const { return is_visible_; }
+ virtual bool IsVisible() const;
// Return whether a view and its ancestors are visible. Returns true if the
// path from this view to the root view is visible.
@@ -458,7 +458,7 @@ class View : public AcceleratorTarget {
// when moving focus with the Tab/Shift-Tab key. If this returns false,
// only the selected view from the group (obtained with
// GetSelectedViewForGroup()) is focused.
- virtual bool IsGroupFocusTraversable() const { return true; }
+ virtual bool IsGroupFocusTraversable() const;
// Fills the provided vector with all the available views which belong to the
// provided group.
@@ -692,9 +692,7 @@ class View : public AcceleratorTarget {
// Called when a keyboard accelerator is pressed.
// Derived classes should implement desired behavior and return true if they
// handled the accelerator.
- virtual bool AcceleratorPressed(const Accelerator& accelerator) {
- return false;
- }
+ virtual bool AcceleratorPressed(const Accelerator& accelerator);
// Focus ---------------------------------------------------------------------
@@ -731,9 +729,7 @@ class View : public AcceleratorTarget {
// Set whether this view can be made focusable if the user requires
// full keyboard access, even though it's not normally focusable.
// Note that this is false by default.
- virtual void set_accessibility_focusable(bool accessibility_focusable) {
- accessibility_focusable_ = accessibility_focusable;
- }
+ virtual void set_accessibility_focusable(bool accessibility_focusable);
// Convenience method to retrieve the FocusManager associated with the
// Widget that contains this view. This can return NULL if this view is not
@@ -758,21 +754,19 @@ class View : public AcceleratorTarget {
// have it processed as an accelerator (if any) or as a tab traversal (if the
// key event is for the TAB key). In that case, OnKeyPressed will
// subsequently be invoked for that event.
- virtual bool SkipDefaultKeyEventProcessing(const KeyEvent& e) {
- return false;
- }
+ virtual bool SkipDefaultKeyEventProcessing(const KeyEvent& e);
// Subclasses that contain traversable children that are not directly
// accessible through the children hierarchy should return the associated
// FocusTraversable for the focus traversal to work properly.
- virtual FocusTraversable* GetFocusTraversable() { return NULL; }
+ virtual FocusTraversable* GetFocusTraversable();
// Subclasses that can act as a "pane" must implement their own
// FocusTraversable to keep the focus trapped within the pane.
// If this method returns an object, any view that's a direct or
// indirect child of this view will always use this FocusTraversable
// rather than the one from the widget.
- virtual FocusTraversable* GetPaneFocusTraversable() { return NULL; }
+ virtual FocusTraversable* GetPaneFocusTraversable();
// Tooltips ------------------------------------------------------------------
@@ -892,13 +886,11 @@ class View : public AcceleratorTarget {
// describes the default action that will occur when executing
// IAccessible::DoDefaultAction. For instance, default action of a button is
// 'Press'.
- virtual string16 GetAccessibleDefaultAction() { return string16(); }
+ virtual string16 GetAccessibleDefaultAction();
// Returns a string containing the mnemonic, or the keyboard shortcut, for a
// given control.
- virtual string16 GetAccessibleKeyboardShortcut() {
- return string16();
- }
+ virtual string16 GetAccessibleKeyboardShortcut();
// Returns a brief, identifying string, containing a unique, readable name of
// a given control. Sets the input string appropriately, and returns true if
@@ -911,12 +903,10 @@ class View : public AcceleratorTarget {
virtual AccessibilityTypes::Role GetAccessibleRole();
// Returns the accessibility state of the current view.
- virtual AccessibilityTypes::State GetAccessibleState() {
- return 0;
- }
+ virtual AccessibilityTypes::State GetAccessibleState();
// Returns the current value associated with a view.
- virtual string16 GetAccessibleValue() { return string16(); }
+ virtual string16 GetAccessibleValue();
// Assigns a string name to the given control. Needed as a View does not know
// which name will be associated with it until it is created to be a

Powered by Google App Engine
This is Rietveld 408576698