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

Side by Side Diff: Source/core/dom/DocumentMarker.cpp

Issue 126633004: Update DOM 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/dom/DocumentLifecycleNotifier.h ('k') | Source/core/dom/Element.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 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 19 matching lines...) Expand all
30 30
31 #include "config.h" 31 #include "config.h"
32 #include "core/dom/DocumentMarker.h" 32 #include "core/dom/DocumentMarker.h"
33 33
34 namespace WebCore { 34 namespace WebCore {
35 35
36 DocumentMarkerDetails::~DocumentMarkerDetails() 36 DocumentMarkerDetails::~DocumentMarkerDetails()
37 { 37 {
38 } 38 }
39 39
40 class DocumentMarkerDescription : public DocumentMarkerDetails { 40 class DocumentMarkerDescription FINAL : public DocumentMarkerDetails {
41 public: 41 public:
42 static PassRefPtr<DocumentMarkerDescription> create(const String&); 42 static PassRefPtr<DocumentMarkerDescription> create(const String&);
43 43
44 const String& description() const { return m_description; } 44 const String& description() const { return m_description; }
45 virtual bool isDescription() const { return true; } 45 virtual bool isDescription() const OVERRIDE { return true; }
46 46
47 private: 47 private:
48 DocumentMarkerDescription(const String& description) 48 DocumentMarkerDescription(const String& description)
49 : m_description(description) 49 : m_description(description)
50 { 50 {
51 } 51 }
52 52
53 String m_description; 53 String m_description;
54 }; 54 };
55 55
56 PassRefPtr<DocumentMarkerDescription> DocumentMarkerDescription::create(const St ring& description) 56 PassRefPtr<DocumentMarkerDescription> DocumentMarkerDescription::create(const St ring& description)
57 { 57 {
58 return adoptRef(new DocumentMarkerDescription(description)); 58 return adoptRef(new DocumentMarkerDescription(description));
59 } 59 }
60 60
61 inline DocumentMarkerDescription* toDocumentMarkerDescription(DocumentMarkerDeta ils* details) 61 inline DocumentMarkerDescription* toDocumentMarkerDescription(DocumentMarkerDeta ils* details)
62 { 62 {
63 if (details && details->isDescription()) 63 if (details && details->isDescription())
64 return static_cast<DocumentMarkerDescription*>(details); 64 return static_cast<DocumentMarkerDescription*>(details);
65 return 0; 65 return 0;
66 } 66 }
67 67
68 68
69 class DocumentMarkerTextMatch : public DocumentMarkerDetails { 69 class DocumentMarkerTextMatch FINAL : public DocumentMarkerDetails {
70 public: 70 public:
71 static PassRefPtr<DocumentMarkerTextMatch> instanceFor(bool); 71 static PassRefPtr<DocumentMarkerTextMatch> instanceFor(bool);
72 72
73 bool activeMatch() const { return m_match; } 73 bool activeMatch() const { return m_match; }
74 virtual bool isTextMatch() const { return true; } 74 virtual bool isTextMatch() const OVERRIDE { return true; }
75 75
76 private: 76 private:
77 explicit DocumentMarkerTextMatch(bool match) 77 explicit DocumentMarkerTextMatch(bool match)
78 : m_match(match) 78 : m_match(match)
79 { 79 {
80 } 80 }
81 81
82 bool m_match; 82 bool m_match;
83 }; 83 };
84 84
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 } 168 }
169 169
170 bool DocumentMarker::activeMatch() const 170 bool DocumentMarker::activeMatch() const
171 { 171 {
172 if (DocumentMarkerTextMatch* details = toDocumentMarkerTextMatch(m_details.g et())) 172 if (DocumentMarkerTextMatch* details = toDocumentMarkerTextMatch(m_details.g et()))
173 return details->activeMatch(); 173 return details->activeMatch();
174 return false; 174 return false;
175 } 175 }
176 176
177 } // namespace WebCore 177 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/dom/DocumentLifecycleNotifier.h ('k') | Source/core/dom/Element.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698