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

Side by Side Diff: Source/modules/webmidi/MIDIPortMap.h

Issue 635813002: Replace FINAL and OVERRIDE with their C++11 counterparts in Source/modules/webmidi (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « Source/modules/webmidi/MIDIPort.h ('k') | Source/modules/webmidi/NavigatorWebMIDI.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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 MIDIPortMap_h 5 #ifndef MIDIPortMap_h
6 #define MIDIPortMap_h 6 #define MIDIPortMap_h
7 7
8 #include "bindings/core/v8/ExceptionState.h" 8 #include "bindings/core/v8/ExceptionState.h"
9 #include "bindings/core/v8/ScriptState.h" 9 #include "bindings/core/v8/ScriptState.h"
10 #include "bindings/core/v8/ScriptValue.h" 10 #include "bindings/core/v8/ScriptValue.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 template <typename Selector> 60 template <typename Selector>
61 class MapIterator : public Iterator { 61 class MapIterator : public Iterator {
62 public: 62 public:
63 MapIterator(MIDIPortMap<T>* map, IteratorType iterator, IteratorType end ) 63 MapIterator(MIDIPortMap<T>* map, IteratorType iterator, IteratorType end )
64 : m_map(map) 64 : m_map(map)
65 , m_iterator(iterator) 65 , m_iterator(iterator)
66 , m_end(end) 66 , m_end(end)
67 { 67 {
68 } 68 }
69 69
70 virtual ScriptValue next(ScriptState* scriptState, ExceptionState&) OVER RIDE 70 virtual ScriptValue next(ScriptState* scriptState, ExceptionState&) over ride
71 { 71 {
72 if (m_iterator == m_end) 72 if (m_iterator == m_end)
73 return ScriptValue(scriptState, v8DoneIteratorResult(scriptState ->isolate())); 73 return ScriptValue(scriptState, v8DoneIteratorResult(scriptState ->isolate()));
74 ScriptValue result(scriptState, v8IteratorResult(scriptState, Select or::select(scriptState, m_iterator))); 74 ScriptValue result(scriptState, v8IteratorResult(scriptState, Select or::select(scriptState, m_iterator)));
75 ++m_iterator; 75 ++m_iterator;
76 return result; 76 return result;
77 } 77 }
78 78
79 virtual ScriptValue next(ScriptState* scriptState, ScriptValue, Exceptio nState& exceptionState) OVERRIDE 79 virtual ScriptValue next(ScriptState* scriptState, ScriptValue, Exceptio nState& exceptionState) override
80 { 80 {
81 return next(scriptState, exceptionState); 81 return next(scriptState, exceptionState);
82 } 82 }
83 83
84 virtual void trace(Visitor* visitor) OVERRIDE 84 virtual void trace(Visitor* visitor) override
85 { 85 {
86 visitor->trace(m_map); 86 visitor->trace(m_map);
87 Iterator::trace(visitor); 87 Iterator::trace(visitor);
88 } 88 }
89 89
90 private: 90 private:
91 // m_map is stored just for keeping it alive. It needs to be kept 91 // m_map is stored just for keeping it alive. It needs to be kept
92 // alive while JavaScript holds the iterator to it. 92 // alive while JavaScript holds the iterator to it.
93 const Member<const MIDIPortMap<T> > m_map; 93 const Member<const MIDIPortMap<T> > m_map;
94 IteratorType m_iterator; 94 IteratorType m_iterator;
(...skipping 23 matching lines...) Expand all
118 118
119 template <typename T> 119 template <typename T>
120 T* MIDIPortMap<T>::get(const String& key) const 120 T* MIDIPortMap<T>::get(const String& key) const
121 { 121 {
122 return has(key) ? m_entries.get(key) : 0; 122 return has(key) ? m_entries.get(key) : 0;
123 } 123 }
124 124
125 } // namespace blink 125 } // namespace blink
126 126
127 #endif 127 #endif
OLDNEW
« no previous file with comments | « Source/modules/webmidi/MIDIPort.h ('k') | Source/modules/webmidi/NavigatorWebMIDI.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698