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

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

Issue 2011553008: [Binding] [Refactoring] Move some create() from SerializedScriptValueFactory to SerializedScriptValu (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
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 2143 matching lines...) Expand 10 before | Expand all | Expand 10 after
2154 { 2154 {
2155 String stringValue = value->toWireString(); 2155 String stringValue = value->toWireString();
2156 DOMArrayBuffer* buffer = DOMArrayBuffer::createUninitialized(stringValue.len gth(), sizeof(UChar)); 2156 DOMArrayBuffer* buffer = DOMArrayBuffer::createUninitialized(stringValue.len gth(), sizeof(UChar));
2157 stringValue.copyTo(static_cast<UChar*>(buffer->data()), 0, stringValue.lengt h()); 2157 stringValue.copyTo(static_cast<UChar*>(buffer->data()), 0, stringValue.lengt h());
2158 return buffer; 2158 return buffer;
2159 } 2159 }
2160 2160
2161 PassRefPtr<SerializedScriptValue> Internals::deserializeBuffer(DOMArrayBuffer* b uffer) const 2161 PassRefPtr<SerializedScriptValue> Internals::deserializeBuffer(DOMArrayBuffer* b uffer) const
2162 { 2162 {
2163 String value(static_cast<const UChar*>(buffer->data()), buffer->byteLength() / sizeof(UChar)); 2163 String value(static_cast<const UChar*>(buffer->data()), buffer->byteLength() / sizeof(UChar));
2164 return SerializedScriptValueFactory::instance().createFromWire(value); 2164 return SerializedScriptValue::create(value);
2165 } 2165 }
2166 2166
2167 void Internals::forceReload(bool bypassCache) 2167 void Internals::forceReload(bool bypassCache)
2168 { 2168 {
2169 frame()->reload(bypassCache ? FrameLoadTypeReloadBypassingCache : FrameLoadT ypeReload, ClientRedirectPolicy::NotClientRedirect); 2169 frame()->reload(bypassCache ? FrameLoadTypeReloadBypassingCache : FrameLoadT ypeReload, ClientRedirectPolicy::NotClientRedirect);
2170 } 2170 }
2171 2171
2172 ClientRect* Internals::selectionBounds(ExceptionState& exceptionState) 2172 ClientRect* Internals::selectionBounds(ExceptionState& exceptionState)
2173 { 2173 {
2174 Document* document = contextDocument(); 2174 Document* document = contextDocument();
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
2588 } 2588 }
2589 2589
2590 String Internals::getProgrammaticScrollAnimationState(Node* node) const 2590 String Internals::getProgrammaticScrollAnimationState(Node* node) const
2591 { 2591 {
2592 if (ScrollableArea* scrollableArea = scrollableAreaForNode(node)) 2592 if (ScrollableArea* scrollableArea = scrollableAreaForNode(node))
2593 return scrollableArea->programmaticScrollAnimator().runStateAsText(); 2593 return scrollableArea->programmaticScrollAnimator().runStateAsText();
2594 return String(); 2594 return String();
2595 } 2595 }
2596 2596
2597 } // namespace blink 2597 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/MessagePort.cpp ('k') | third_party/WebKit/Source/modules/notifications/Notification.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698