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 2120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2131 } | 2131 } |
2132 | 2132 |
2133 return result.toString(); | 2133 return result.toString(); |
2134 } | 2134 } |
2135 | 2135 |
2136 bool Internals::cursorUpdatePending() const | 2136 bool Internals::cursorUpdatePending() const |
2137 { | 2137 { |
2138 return frame()->eventHandler().cursorUpdatePending(); | 2138 return frame()->eventHandler().cursorUpdatePending(); |
2139 } | 2139 } |
2140 | 2140 |
2141 DOMArrayBuffer* Internals::serializeObject(PassRefPtr<SerializedScriptValue> val
ue) const | 2141 PassRefPtr<DOMArrayBuffer> Internals::serializeObject(PassRefPtr<SerializedScrip
tValue> value) const |
2142 { | 2142 { |
2143 String stringValue = value->toWireString(); | 2143 String stringValue = value->toWireString(); |
2144 DOMArrayBuffer* buffer = DOMArrayBuffer::createUninitialized(stringValue.len
gth(), sizeof(UChar)); | 2144 RefPtr<DOMArrayBuffer> buffer = DOMArrayBuffer::createUninitialized(stringVa
lue.length(), sizeof(UChar)); |
2145 stringValue.copyTo(static_cast<UChar*>(buffer->data()), 0, stringValue.lengt
h()); | 2145 stringValue.copyTo(static_cast<UChar*>(buffer->data()), 0, stringValue.lengt
h()); |
2146 return buffer; | 2146 return buffer.release(); |
2147 } | 2147 } |
2148 | 2148 |
2149 PassRefPtr<SerializedScriptValue> Internals::deserializeBuffer(DOMArrayBuffer* b
uffer) const | 2149 PassRefPtr<SerializedScriptValue> Internals::deserializeBuffer(PassRefPtr<DOMArr
ayBuffer> buffer) const |
2150 { | 2150 { |
2151 String value(static_cast<const UChar*>(buffer->data()), buffer->byteLength()
/ sizeof(UChar)); | 2151 String value(static_cast<const UChar*>(buffer->data()), buffer->byteLength()
/ sizeof(UChar)); |
2152 return SerializedScriptValueFactory::instance().createFromWire(value); | 2152 return SerializedScriptValueFactory::instance().createFromWire(value); |
2153 } | 2153 } |
2154 | 2154 |
2155 void Internals::forceReload(bool bypassCache) | 2155 void Internals::forceReload(bool bypassCache) |
2156 { | 2156 { |
2157 frame()->reload(bypassCache ? FrameLoadTypeReloadBypassingCache : FrameLoadT
ypeReload, ClientRedirectPolicy::NotClientRedirect); | 2157 frame()->reload(bypassCache ? FrameLoadTypeReloadBypassingCache : FrameLoadT
ypeReload, ClientRedirectPolicy::NotClientRedirect); |
2158 } | 2158 } |
2159 | 2159 |
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2581 } | 2581 } |
2582 | 2582 |
2583 String Internals::getProgrammaticScrollAnimationState(Node* node) const | 2583 String Internals::getProgrammaticScrollAnimationState(Node* node) const |
2584 { | 2584 { |
2585 if (ScrollableArea* scrollableArea = scrollableAreaForNode(node)) | 2585 if (ScrollableArea* scrollableArea = scrollableAreaForNode(node)) |
2586 return scrollableArea->programmaticScrollAnimator().runStateAsText(); | 2586 return scrollableArea->programmaticScrollAnimator().runStateAsText(); |
2587 return String(); | 2587 return String(); |
2588 } | 2588 } |
2589 | 2589 |
2590 } // namespace blink | 2590 } // namespace blink |
OLD | NEW |