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

Side by Side Diff: Source/core/accessibility/AXSpinButton.h

Issue 131093003: Update accessibility classes to use OVERRIDE / FINAL when needed (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/accessibility/AXSlider.h ('k') | Source/core/accessibility/AXTable.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2011 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 14 matching lines...) Expand all
25 25
26 #ifndef AXSpinButton_h 26 #ifndef AXSpinButton_h
27 #define AXSpinButton_h 27 #define AXSpinButton_h
28 28
29 #include "core/accessibility/AXMockObject.h" 29 #include "core/accessibility/AXMockObject.h"
30 30
31 #include "core/html/shadow/SpinButtonElement.h" 31 #include "core/html/shadow/SpinButtonElement.h"
32 32
33 namespace WebCore { 33 namespace WebCore {
34 34
35 class AXSpinButton : public AXMockObject { 35 class AXSpinButton FINAL : public AXMockObject {
36 public: 36 public:
37 static PassRefPtr<AXSpinButton> create(); 37 static PassRefPtr<AXSpinButton> create();
38 virtual ~AXSpinButton(); 38 virtual ~AXSpinButton();
39 39
40 void setSpinButtonElement(SpinButtonElement* spinButton) { m_spinButtonEleme nt = spinButton; } 40 void setSpinButtonElement(SpinButtonElement* spinButton) { m_spinButtonEleme nt = spinButton; }
41 void step(int amount); 41 void step(int amount);
42 42
43 private: 43 private:
44 AXSpinButton(); 44 AXSpinButton();
45 45
46 virtual AccessibilityRole roleValue() const OVERRIDE { return SpinButtonRole ; } 46 virtual AccessibilityRole roleValue() const OVERRIDE { return SpinButtonRole ; }
47 virtual bool isSpinButton() const OVERRIDE { return true; } 47 virtual bool isSpinButton() const OVERRIDE { return true; }
48 virtual bool isNativeSpinButton() const OVERRIDE { return true; } 48 virtual bool isNativeSpinButton() const OVERRIDE { return true; }
49 virtual void addChildren() OVERRIDE; 49 virtual void addChildren() OVERRIDE;
50 virtual LayoutRect elementRect() const OVERRIDE; 50 virtual LayoutRect elementRect() const OVERRIDE;
51 51
52 SpinButtonElement* m_spinButtonElement; 52 SpinButtonElement* m_spinButtonElement;
53 }; 53 };
54 54
55 class AXSpinButtonPart : public AXMockObject { 55 class AXSpinButtonPart FINAL : public AXMockObject {
56 public: 56 public:
57 static PassRefPtr<AXSpinButtonPart> create(); 57 static PassRefPtr<AXSpinButtonPart> create();
58 virtual ~AXSpinButtonPart() { } 58 virtual ~AXSpinButtonPart() { }
59 59
60 bool isIncrementor() const { return m_isIncrementor; } 60 bool isIncrementor() const { return m_isIncrementor; }
61 void setIsIncrementor(bool value) { m_isIncrementor = value; } 61 void setIsIncrementor(bool value) { m_isIncrementor = value; }
62 62
63 private: 63 private:
64 AXSpinButtonPart(); 64 AXSpinButtonPart();
65 bool m_isIncrementor : 1; 65 bool m_isIncrementor : 1;
66 66
67 virtual bool press() const OVERRIDE; 67 virtual bool press() const OVERRIDE;
68 virtual AccessibilityRole roleValue() const OVERRIDE { return ButtonRole; } 68 virtual AccessibilityRole roleValue() const OVERRIDE { return ButtonRole; }
69 virtual bool isSpinButtonPart() const OVERRIDE { return true; } 69 virtual bool isSpinButtonPart() const OVERRIDE { return true; }
70 virtual LayoutRect elementRect() const OVERRIDE; 70 virtual LayoutRect elementRect() const OVERRIDE;
71 }; 71 };
72 72
73 DEFINE_AX_OBJECT_TYPE_CASTS(AXSpinButton, isNativeSpinButton()); 73 DEFINE_AX_OBJECT_TYPE_CASTS(AXSpinButton, isNativeSpinButton());
74 DEFINE_AX_OBJECT_TYPE_CASTS(AXSpinButtonPart, isSpinButtonPart()); 74 DEFINE_AX_OBJECT_TYPE_CASTS(AXSpinButtonPart, isSpinButtonPart());
75 75
76 } // namespace WebCore 76 } // namespace WebCore
77 77
78 #endif // AXSpinButton_h 78 #endif // AXSpinButton_h
OLDNEW
« no previous file with comments | « Source/core/accessibility/AXSlider.h ('k') | Source/core/accessibility/AXTable.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698