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

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

Issue 1167343002: Add methods for creating V8 extras-based ReadableStreams from C++ (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove C++ queuing strategies Created 5 years, 6 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 12 matching lines...) Expand all
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 */ 25 */
26 26
27 #ifndef Internals_h 27 #ifndef Internals_h
28 #define Internals_h 28 #define Internals_h
29 29
30 #include "bindings/core/v8/ExceptionStatePlaceholder.h" 30 #include "bindings/core/v8/ExceptionStatePlaceholder.h"
31 #include "bindings/core/v8/Iterable.h" 31 #include "bindings/core/v8/Iterable.h"
32 #include "bindings/core/v8/ScriptPromise.h" 32 #include "bindings/core/v8/ScriptPromise.h"
33 #include "bindings/core/v8/ScriptState.h"
33 #include "bindings/core/v8/ScriptValue.h" 34 #include "bindings/core/v8/ScriptValue.h"
34 #include "bindings/core/v8/ScriptWrappable.h" 35 #include "bindings/core/v8/ScriptWrappable.h"
35 #include "core/css/CSSComputedStyleDeclaration.h" 36 #include "core/css/CSSComputedStyleDeclaration.h"
36 #include "core/dom/ContextLifecycleObserver.h" 37 #include "core/dom/ContextLifecycleObserver.h"
37 #include "core/page/scrolling/ScrollingCoordinator.h" 38 #include "core/page/scrolling/ScrollingCoordinator.h"
38 #include "platform/heap/Handle.h" 39 #include "platform/heap/Handle.h"
39 #include "wtf/PassRefPtr.h" 40 #include "wtf/PassRefPtr.h"
40 #include "wtf/RefCounted.h" 41 #include "wtf/RefCounted.h"
41 #include "wtf/text/WTFString.h" 42 #include "wtf/text/WTFString.h"
42 43
(...skipping 17 matching lines...) Expand all
60 class InternalSettings; 61 class InternalSettings;
61 class Iterator; 62 class Iterator;
62 class LayerRectList; 63 class LayerRectList;
63 class LocalDOMWindow; 64 class LocalDOMWindow;
64 class LocalFrame; 65 class LocalFrame;
65 class Node; 66 class Node;
66 class Page; 67 class Page;
67 class PluginPlaceholderOptions; 68 class PluginPlaceholderOptions;
68 class PrivateScriptTest; 69 class PrivateScriptTest;
69 class Range; 70 class Range;
71 class ReadableStream2;
70 class SerializedScriptValue; 72 class SerializedScriptValue;
71 class ShadowRoot; 73 class ShadowRoot;
72 class TypeConversions; 74 class TypeConversions;
73 class UnionTypesTest; 75 class UnionTypesTest;
74 template <typename NodeType> class StaticNodeTypeList; 76 template <typename NodeType> class StaticNodeTypeList;
75 typedef StaticNodeTypeList<Node> StaticNodeList; 77 typedef StaticNodeTypeList<Node> StaticNodeList;
76 78
77 class Internals final : public GarbageCollectedFinalized<Internals>, public Scri ptWrappable, public ContextLifecycleObserver, public ValueIterable<int> { 79 class Internals final : public GarbageCollectedFinalized<Internals>, public Scri ptWrappable, public ContextLifecycleObserver, public ValueIterable<int> {
78 DEFINE_WRAPPERTYPEINFO(); 80 DEFINE_WRAPPERTYPEINFO();
79 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(Internals); 81 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(Internals);
80 public: 82 public:
81 static Internals* create(Document*); 83 static Internals* create(ScriptState*);
82 virtual ~Internals(); 84 virtual ~Internals();
83 85
84 static void resetToConsistentState(Page*); 86 static void resetToConsistentState(Page*);
85 87
86 String elementLayoutTreeAsText(Element*, ExceptionState&); 88 String elementLayoutTreeAsText(Element*, ExceptionState&);
87 89
88 String address(Node*); 90 String address(Node*);
89 91
90 GCObservation* observeGC(ScriptValue); 92 GCObservation* observeGC(ScriptValue);
91 93
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 355
354 // Return true if the given use counter exists for the given document. 356 // Return true if the given use counter exists for the given document.
355 // |useCounterId| must be one of the values from the UseCounter::Feature enu m. 357 // |useCounterId| must be one of the values from the UseCounter::Feature enu m.
356 bool isUseCounted(Document*, int useCounterId); 358 bool isUseCounted(Document*, int useCounterId);
357 359
358 String unscopeableAttribute(); 360 String unscopeableAttribute();
359 String unscopeableMethod(); 361 String unscopeableMethod();
360 362
361 ClientRectList* focusRingRects(Element*); 363 ClientRectList* focusRingRects(Element*);
362 364
365 ScriptValue readableStream();
366
363 private: 367 private:
364 explicit Internals(Document*); 368 explicit Internals(ScriptState*);
365 Document* contextDocument() const; 369 Document* contextDocument() const;
366 LocalFrame* frame() const; 370 LocalFrame* frame() const;
367 Vector<String> iconURLs(Document*, int iconTypesMask) const; 371 Vector<String> iconURLs(Document*, int iconTypesMask) const;
368 ClientRectList* annotatedRegions(Document*, bool draggable, ExceptionState&) ; 372 ClientRectList* annotatedRegions(Document*, bool draggable, ExceptionState&) ;
369 373
370 DocumentMarker* markerAt(Node*, const String& markerType, unsigned index, Ex ceptionState&); 374 DocumentMarker* markerAt(Node*, const String& markerType, unsigned index, Ex ceptionState&);
371 Member<InternalRuntimeFlags> m_runtimeFlags; 375 Member<InternalRuntimeFlags> m_runtimeFlags;
372 376
373 IterationSource* startIteration(ScriptState*, ExceptionState&) override; 377 IterationSource* startIteration(ScriptState*, ExceptionState&) override;
378
379 ReadableStream2* m_readableStream;
374 }; 380 };
375 381
376 } // namespace blink 382 } // namespace blink
377 383
378 #endif // Internals_h 384 #endif // Internals_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698