| 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 2218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2229 AddOneFunction* self = new AddOneFunction(scriptState); | 2229 AddOneFunction* self = new AddOneFunction(scriptState); |
| 2230 return self->bindToV8Function(); | 2230 return self->bindToV8Function(); |
| 2231 } | 2231 } |
| 2232 | 2232 |
| 2233 private: | 2233 private: |
| 2234 explicit AddOneFunction(ScriptState* scriptState) | 2234 explicit AddOneFunction(ScriptState* scriptState) |
| 2235 : ScriptFunction(scriptState) | 2235 : ScriptFunction(scriptState) |
| 2236 { | 2236 { |
| 2237 } | 2237 } |
| 2238 | 2238 |
| 2239 virtual ScriptValue call(ScriptValue value) override | 2239 ScriptValue call(ScriptValue value) override |
| 2240 { | 2240 { |
| 2241 v8::Local<v8::Value> v8Value = value.v8Value(); | 2241 v8::Local<v8::Value> v8Value = value.v8Value(); |
| 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 |
| (...skipping 206 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 |