summaryrefslogtreecommitdiffstats
path: root/views/view.h
diff options
context:
space:
mode:
authorerg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-04 23:15:53 +0000
committererg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-04 23:15:53 +0000
commit164606478faaa606df0c3d2637c4c0a476a59414 (patch)
tree2fd9491713efb56e15883848237f83c119c68a69 /views/view.h
parent039c7b0b28a2501bf4f305ec9e21dbb7518e52cc (diff)
downloadchromium_src-164606478faaa606df0c3d2637c4c0a476a59414.zip
chromium_src-164606478faaa606df0c3d2637c4c0a476a59414.tar.gz
chromium_src-164606478faaa606df0c3d2637c4c0a476a59414.tar.bz2
Do all OOLing in the views code. linux_views now builds clean with the clang plugin.
BUG=carnitas TEST=compiles Review URL: http://codereview.chromium.org/6622002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76992 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/view.h')
-rw-r--r--views/view.h36
1 files changed, 13 insertions, 23 deletions
diff --git a/views/view.h b/views/view.h
index 695fffb..3e62f99 100644
--- a/views/view.h
+++ b/views/view.h
@@ -154,13 +154,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 -----------------------------------------------------
@@ -309,7 +309,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.
@@ -459,7 +459,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.
@@ -693,9 +693,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 ---------------------------------------------------------------------
@@ -732,9 +730,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
@@ -759,21 +755,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 ------------------------------------------------------------------
@@ -893,13 +887,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
@@ -912,12 +904,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