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

Side by Side Diff: Source/core/testing/Internals.cpp

Issue 636913002: Replace FINAL and OVERRIDE with their C++11 counterparts in Source/core/testing (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/core/testing/Internals.h ('k') | Source/core/testing/LayerRect.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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2013 Apple Inc. All rights reserved. 3 * Copyright (C) 2013 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 #include "wtf/InstanceCounter.h" 141 #include "wtf/InstanceCounter.h"
142 #include "wtf/PassOwnPtr.h" 142 #include "wtf/PassOwnPtr.h"
143 #include "wtf/dtoa.h" 143 #include "wtf/dtoa.h"
144 #include "wtf/text/StringBuffer.h" 144 #include "wtf/text/StringBuffer.h"
145 #include <v8.h> 145 #include <v8.h>
146 146
147 namespace blink { 147 namespace blink {
148 148
149 namespace { 149 namespace {
150 150
151 class InternalsIterator FINAL : public Iterator { 151 class InternalsIterator final : public Iterator {
152 public: 152 public:
153 InternalsIterator() : m_current(0) { } 153 InternalsIterator() : m_current(0) { }
154 154
155 virtual ScriptValue next(ScriptState* scriptState, ExceptionState& exception State) OVERRIDE 155 virtual ScriptValue next(ScriptState* scriptState, ExceptionState& exception State) override
156 { 156 {
157 v8::Isolate* isolate = scriptState->isolate(); 157 v8::Isolate* isolate = scriptState->isolate();
158 int value = m_current * m_current; 158 int value = m_current * m_current;
159 if (m_current >= 5) 159 if (m_current >= 5)
160 return ScriptValue(scriptState, v8DoneIteratorResult(isolate)); 160 return ScriptValue(scriptState, v8DoneIteratorResult(isolate));
161 ++m_current; 161 ++m_current;
162 return ScriptValue(scriptState, v8IteratorResult(scriptState, value)); 162 return ScriptValue(scriptState, v8IteratorResult(scriptState, value));
163 } 163 }
164 164
165 virtual ScriptValue next(ScriptState* scriptState, ScriptValue value, Except ionState& exceptionState) OVERRIDE 165 virtual ScriptValue next(ScriptState* scriptState, ScriptValue value, Except ionState& exceptionState) override
166 { 166 {
167 exceptionState.throwTypeError("Not implemented"); 167 exceptionState.throwTypeError("Not implemented");
168 return ScriptValue(); 168 return ScriptValue();
169 } 169 }
170 170
171 private: 171 private:
172 int m_current; 172 int m_current;
173 }; 173 };
174 174
175 } // namespace 175 } // namespace
(...skipping 1934 matching lines...) Expand 10 before | Expand all | Expand 10 after
2110 AddOneFunction* self = new AddOneFunction(scriptState); 2110 AddOneFunction* self = new AddOneFunction(scriptState);
2111 return self->bindToV8Function(); 2111 return self->bindToV8Function();
2112 } 2112 }
2113 2113
2114 private: 2114 private:
2115 explicit AddOneFunction(ScriptState* scriptState) 2115 explicit AddOneFunction(ScriptState* scriptState)
2116 : ScriptFunction(scriptState) 2116 : ScriptFunction(scriptState)
2117 { 2117 {
2118 } 2118 }
2119 2119
2120 virtual ScriptValue call(ScriptValue value) OVERRIDE 2120 virtual ScriptValue call(ScriptValue value) override
2121 { 2121 {
2122 v8::Local<v8::Value> v8Value = value.v8Value(); 2122 v8::Local<v8::Value> v8Value = value.v8Value();
2123 ASSERT(v8Value->IsNumber()); 2123 ASSERT(v8Value->IsNumber());
2124 int intValue = v8Value.As<v8::Integer>()->Value(); 2124 int intValue = v8Value.As<v8::Integer>()->Value();
2125 return ScriptValue(scriptState(), v8::Integer::New(scriptState()->isolat e(), intValue + 1)); 2125 return ScriptValue(scriptState(), v8::Integer::New(scriptState()->isolat e(), intValue + 1));
2126 } 2126 }
2127 }; 2127 };
2128 2128
2129 } // namespace 2129 } // namespace
2130 2130
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
2289 2289
2290 toHTMLPlugInElement(element)->setUsePlaceholderContent(true); 2290 toHTMLPlugInElement(element)->setUsePlaceholderContent(true);
2291 } 2291 }
2292 2292
2293 Iterator* Internals::iterator(ScriptState* scriptState, ExceptionState& exceptio nState) 2293 Iterator* Internals::iterator(ScriptState* scriptState, ExceptionState& exceptio nState)
2294 { 2294 {
2295 return new InternalsIterator; 2295 return new InternalsIterator;
2296 } 2296 }
2297 2297
2298 } // namespace blink 2298 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/testing/Internals.h ('k') | Source/core/testing/LayerRect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698