| OLD | NEW |
| 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 2231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2242 ASSERT(v8Value->IsNumber()); | 2242 ASSERT(v8Value->IsNumber()); |
| 2243 int intValue = v8Value.As<v8::Integer>()->Value(); | 2243 int intValue = v8Value.As<v8::Integer>()->Value(); |
| 2244 return ScriptValue(scriptState(), v8::Integer::New(scriptState()->isolat
e(), intValue + 1)); | 2244 return ScriptValue(scriptState(), v8::Integer::New(scriptState()->isolat
e(), intValue + 1)); |
| 2245 } | 2245 } |
| 2246 }; | 2246 }; |
| 2247 | 2247 |
| 2248 } // namespace | 2248 } // namespace |
| 2249 | 2249 |
| 2250 ScriptPromise Internals::createResolvedPromise(ScriptState* scriptState, ScriptV
alue value) | 2250 ScriptPromise Internals::createResolvedPromise(ScriptState* scriptState, ScriptV
alue value) |
| 2251 { | 2251 { |
| 2252 RefPtrWillBeRawPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::
create(scriptState); | 2252 ScriptPromiseResolver* resolver = ScriptPromiseResolver::create(scriptState)
; |
| 2253 ScriptPromise promise = resolver->promise(); | 2253 ScriptPromise promise = resolver->promise(); |
| 2254 resolver->resolve(value); | 2254 resolver->resolve(value); |
| 2255 return promise; | 2255 return promise; |
| 2256 } | 2256 } |
| 2257 | 2257 |
| 2258 ScriptPromise Internals::createRejectedPromise(ScriptState* scriptState, ScriptV
alue value) | 2258 ScriptPromise Internals::createRejectedPromise(ScriptState* scriptState, ScriptV
alue value) |
| 2259 { | 2259 { |
| 2260 RefPtrWillBeRawPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::
create(scriptState); | 2260 ScriptPromiseResolver* resolver = ScriptPromiseResolver::create(scriptState)
; |
| 2261 ScriptPromise promise = resolver->promise(); | 2261 ScriptPromise promise = resolver->promise(); |
| 2262 resolver->reject(value); | 2262 resolver->reject(value); |
| 2263 return promise; | 2263 return promise; |
| 2264 } | 2264 } |
| 2265 | 2265 |
| 2266 ScriptPromise Internals::addOneToPromise(ScriptState* scriptState, ScriptPromise
promise) | 2266 ScriptPromise Internals::addOneToPromise(ScriptState* scriptState, ScriptPromise
promise) |
| 2267 { | 2267 { |
| 2268 return promise.then(AddOneFunction::createFunction(scriptState)); | 2268 return promise.then(AddOneFunction::createFunction(scriptState)); |
| 2269 } | 2269 } |
| 2270 | 2270 |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2456 return ClientRectList::create(rects); | 2456 return ClientRectList::create(rects); |
| 2457 } | 2457 } |
| 2458 | 2458 |
| 2459 void Internals::setCapsLockState(bool enabled) | 2459 void Internals::setCapsLockState(bool enabled) |
| 2460 { | 2460 { |
| 2461 PlatformKeyboardEvent::setCurrentCapsLockState(enabled ? | 2461 PlatformKeyboardEvent::setCurrentCapsLockState(enabled ? |
| 2462 PlatformKeyboardEvent::OverrideCapsLockState::On : PlatformKeyboardEvent
::OverrideCapsLockState::Off); | 2462 PlatformKeyboardEvent::OverrideCapsLockState::On : PlatformKeyboardEvent
::OverrideCapsLockState::Off); |
| 2463 } | 2463 } |
| 2464 | 2464 |
| 2465 } // namespace blink | 2465 } // namespace blink |
| OLD | NEW |