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

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

Issue 1215953003: Construct Internals with a ScriptState (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 5 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 | « no previous file | 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 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 28 matching lines...) Expand all
71 class ShadowRoot; 72 class ShadowRoot;
72 class TypeConversions; 73 class TypeConversions;
73 class UnionTypesTest; 74 class UnionTypesTest;
74 template <typename NodeType> class StaticNodeTypeList; 75 template <typename NodeType> class StaticNodeTypeList;
75 typedef StaticNodeTypeList<Node> StaticNodeList; 76 typedef StaticNodeTypeList<Node> StaticNodeList;
76 77
77 class Internals final : public GarbageCollectedFinalized<Internals>, public Scri ptWrappable, public ContextLifecycleObserver, public ValueIterable<int> { 78 class Internals final : public GarbageCollectedFinalized<Internals>, public Scri ptWrappable, public ContextLifecycleObserver, public ValueIterable<int> {
78 DEFINE_WRAPPERTYPEINFO(); 79 DEFINE_WRAPPERTYPEINFO();
79 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(Internals); 80 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(Internals);
80 public: 81 public:
81 static Internals* create(Document*); 82 static Internals* create(ScriptState*);
82 virtual ~Internals(); 83 virtual ~Internals();
83 84
84 static void resetToConsistentState(Page*); 85 static void resetToConsistentState(Page*);
85 86
86 String elementLayoutTreeAsText(Element*, ExceptionState&); 87 String elementLayoutTreeAsText(Element*, ExceptionState&);
87 88
88 String address(Node*); 89 String address(Node*);
89 90
90 GCObservation* observeGC(ScriptValue); 91 GCObservation* observeGC(ScriptValue);
91 92
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 bool isUseCounted(Document*, int useCounterId); 361 bool isUseCounted(Document*, int useCounterId);
361 362
362 String unscopeableAttribute(); 363 String unscopeableAttribute();
363 String unscopeableMethod(); 364 String unscopeableMethod();
364 365
365 ClientRectList* focusRingRects(Element*); 366 ClientRectList* focusRingRects(Element*);
366 367
367 void setCapsLockState(bool enabled); 368 void setCapsLockState(bool enabled);
368 369
369 private: 370 private:
370 explicit Internals(Document*); 371 explicit Internals(ScriptState*);
371 Document* contextDocument() const; 372 Document* contextDocument() const;
372 LocalFrame* frame() const; 373 LocalFrame* frame() const;
373 Vector<String> iconURLs(Document*, int iconTypesMask) const; 374 Vector<String> iconURLs(Document*, int iconTypesMask) const;
374 ClientRectList* annotatedRegions(Document*, bool draggable, ExceptionState&) ; 375 ClientRectList* annotatedRegions(Document*, bool draggable, ExceptionState&) ;
375 376
376 DocumentMarker* markerAt(Node*, const String& markerType, unsigned index, Ex ceptionState&); 377 DocumentMarker* markerAt(Node*, const String& markerType, unsigned index, Ex ceptionState&);
377 Member<InternalRuntimeFlags> m_runtimeFlags; 378 Member<InternalRuntimeFlags> m_runtimeFlags;
378 379
379 IterationSource* startIteration(ScriptState*, ExceptionState&) override; 380 IterationSource* startIteration(ScriptState*, ExceptionState&) override;
380 }; 381 };
381 382
382 } // namespace blink 383 } // namespace blink
383 384
384 #endif // Internals_h 385 #endif // Internals_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/testing/Internals.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698