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

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

Issue 848673002: Add keys(), values() and entries() methods on iterable<> interfaces (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « Source/core/dom/Iterable.h ('k') | Source/core/testing/Internals.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 15 matching lines...) Expand all
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/ScriptPromise.h" 31 #include "bindings/core/v8/ScriptPromise.h"
32 #include "bindings/core/v8/ScriptValue.h" 32 #include "bindings/core/v8/ScriptValue.h"
33 #include "bindings/core/v8/ScriptWrappable.h" 33 #include "bindings/core/v8/ScriptWrappable.h"
34 #include "core/css/CSSComputedStyleDeclaration.h" 34 #include "core/css/CSSComputedStyleDeclaration.h"
35 #include "core/dom/ContextLifecycleObserver.h" 35 #include "core/dom/ContextLifecycleObserver.h"
36 #include "core/dom/Iterable.h"
36 #include "core/page/scrolling/ScrollingCoordinator.h" 37 #include "core/page/scrolling/ScrollingCoordinator.h"
37 #include "platform/heap/Handle.h" 38 #include "platform/heap/Handle.h"
38 #include "wtf/PassRefPtr.h" 39 #include "wtf/PassRefPtr.h"
39 #include "wtf/RefCounted.h" 40 #include "wtf/RefCounted.h"
40 #include "wtf/text/WTFString.h" 41 #include "wtf/text/WTFString.h"
41 42
42 namespace blink { 43 namespace blink {
43 44
44 class CanvasRenderingContext2D; 45 class CanvasRenderingContext2D;
45 class ClientRect; 46 class ClientRect;
(...skipping 20 matching lines...) Expand all
66 class PluginPlaceholderOptions; 67 class PluginPlaceholderOptions;
67 class PrivateScriptTest; 68 class PrivateScriptTest;
68 class Range; 69 class Range;
69 class SerializedScriptValue; 70 class SerializedScriptValue;
70 class ShadowRoot; 71 class ShadowRoot;
71 class TypeConversions; 72 class TypeConversions;
72 class UnionTypesTest; 73 class UnionTypesTest;
73 template <typename NodeType> class StaticNodeTypeList; 74 template <typename NodeType> class StaticNodeTypeList;
74 typedef StaticNodeTypeList<Node> StaticNodeList; 75 typedef StaticNodeTypeList<Node> StaticNodeList;
75 76
76 class Internals final : public GarbageCollectedFinalized<Internals>, public Scri ptWrappable, public ContextLifecycleObserver { 77 class Internals final : public GarbageCollectedFinalized<Internals>, public Scri ptWrappable, public ContextLifecycleObserver, public ValueIterable<int> {
77 DEFINE_WRAPPERTYPEINFO(); 78 DEFINE_WRAPPERTYPEINFO();
78 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(Internals); 79 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(Internals);
79 public: 80 public:
80 static Internals* create(Document*); 81 static Internals* create(Document*);
81 virtual ~Internals(); 82 virtual ~Internals();
82 83
83 static void resetToConsistentState(Page*); 84 static void resetToConsistentState(Page*);
84 85
85 String elementRenderTreeAsText(Element*, ExceptionState&); 86 String elementRenderTreeAsText(Element*, ExceptionState&);
86 87
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 PassRefPtrWillBeRawPtr<ClientRectList> getTransitionElementRects(); 332 PassRefPtrWillBeRawPtr<ClientRectList> getTransitionElementRects();
332 void hideAllTransitionElements(); 333 void hideAllTransitionElements();
333 void showAllTransitionElements(); 334 void showAllTransitionElements();
334 void setExitTransitionStylesheetsEnabled(bool); 335 void setExitTransitionStylesheetsEnabled(bool);
335 336
336 unsigned countHitRegions(CanvasRenderingContext2D*); 337 unsigned countHitRegions(CanvasRenderingContext2D*);
337 338
338 void forcePluginPlaceholder(HTMLElement* plugin, PassRefPtrWillBeRawPtr<Docu mentFragment>, ExceptionState&); 339 void forcePluginPlaceholder(HTMLElement* plugin, PassRefPtrWillBeRawPtr<Docu mentFragment>, ExceptionState&);
339 void forcePluginPlaceholder(HTMLElement* plugin, const PluginPlaceholderOpti ons&, ExceptionState&); 340 void forcePluginPlaceholder(HTMLElement* plugin, const PluginPlaceholderOpti ons&, ExceptionState&);
340 341
341 Iterator* iterator(ScriptState*, ExceptionState&);
342
343 // Scheudle a forced Blink GC run (Oilpan) at the end of event loop. 342 // Scheudle a forced Blink GC run (Oilpan) at the end of event loop.
344 // Note: This is designed to be only used from PerformanceTests/BlinkGC to e xplicitly measure only Blink GC time. 343 // Note: This is designed to be only used from PerformanceTests/BlinkGC to e xplicitly measure only Blink GC time.
345 // Normal LayoutTests should use gc() instead as it would trigger both Blink GC and V8 GC. 344 // Normal LayoutTests should use gc() instead as it would trigger both Blink GC and V8 GC.
346 void forceBlinkGCWithoutV8GC(); 345 void forceBlinkGCWithoutV8GC();
347 346
348 private: 347 private:
349 explicit Internals(Document*); 348 explicit Internals(Document*);
350 Document* contextDocument() const; 349 Document* contextDocument() const;
351 LocalFrame* frame() const; 350 LocalFrame* frame() const;
352 Vector<String> iconURLs(Document*, int iconTypesMask) const; 351 Vector<String> iconURLs(Document*, int iconTypesMask) const;
353 PassRefPtrWillBeRawPtr<ClientRectList> annotatedRegions(Document*, bool drag gable, ExceptionState&); 352 PassRefPtrWillBeRawPtr<ClientRectList> annotatedRegions(Document*, bool drag gable, ExceptionState&);
354 353
355 DocumentMarker* markerAt(Node*, const String& markerType, unsigned index, Ex ceptionState&); 354 DocumentMarker* markerAt(Node*, const String& markerType, unsigned index, Ex ceptionState&);
356 Member<InternalRuntimeFlags> m_runtimeFlags; 355 Member<InternalRuntimeFlags> m_runtimeFlags;
356
357 IterationSource* startIteration(ScriptState*, ExceptionState&) override;
357 }; 358 };
358 359
359 } // namespace blink 360 } // namespace blink
360 361
361 #endif // Internals_h 362 #endif // Internals_h
OLDNEW
« no previous file with comments | « Source/core/dom/Iterable.h ('k') | Source/core/testing/Internals.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698