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

Side by Side Diff: Source/bindings/core/dart/DartJsInteropData.h

Issue 1532413002: Added Dartium changes onto 45.0.2454.104 (Closed) Base URL: http://src.chromium.org/blink/branches/chromium/2454
Patch Set: Created 5 years 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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 10 matching lines...) Expand all
21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #ifndef LayerRectList_h 31 #ifndef DartJsInteropData_h
32 #define LayerRectList_h 32 #define DartJsInteropData_h
33 33
34 #include "bindings/core/v8/ScriptWrappable.h"
35 #include "wtf/PassRefPtr.h"
36 #include "wtf/RefCounted.h" 34 #include "wtf/RefCounted.h"
37 #include "wtf/Vector.h" 35
38 #include "wtf/text/WTFString.h" 36 #include <v8.h>
39 37
40 namespace blink { 38 namespace blink {
41 39
42 class ClientRect; 40 class DartJsInteropData {
43 class LayerRect; 41 public:
44 class Node; 42 DartJsInteropData() { m_jsObjectImplDefined = false; }
45 43
46 class LayerRectList final : public GarbageCollected<LayerRectList>, public Scrip tWrappable { 44 v8::Local<v8::Function> captureThisFunction();
47 DEFINE_WRAPPERTYPEINFO(); 45 v8::Local<v8::Function> wrapDartFunction();
48 public: 46 v8::Local<v8::Function> instanceofFunction();
49 static LayerRectList* create()
50 {
51 return new LayerRectList;
52 }
53 47
54 unsigned length() const; 48 bool jsObjectImplDefined() { return m_jsObjectImplDefined; }
55 LayerRect* item(unsigned index); 49 void setJsObjectImplDefined() { m_jsObjectImplDefined = true; }
56 void append(PassRefPtrWillBeRawPtr<Node> layerAssociatedNode, const String& layerName, int layerOffsetX, int layerOffsetY, ClientRect* layerRelativeRect);
57
58 DECLARE_TRACE();
59 50
60 private: 51 private:
61 LayerRectList(); 52 static v8::Local<v8::Function> cacheFunction(v8::Persistent<v8::Function>* c ache, const char* scriptSrc);
62 53
63 HeapVector<Member<LayerRect>> m_list; 54 v8::Persistent<v8::Function> m_captureThisFunction;
55 v8::Persistent<v8::Function> m_wrapDartFunction;
56 v8::Persistent<v8::Function> m_instanceofFunction;
57
58 bool m_jsObjectImplDefined;
59
60 // FIXME: add maps of Dart to V8 and V8 to Dart objects.
64 }; 61 };
65 62
66 } // namespace blink 63 }
67 64
68 #endif // ClientRectList_h 65 #endif // DartJsInteropData_h
OLDNEW
« no previous file with comments | « Source/bindings/core/dart/DartJsInterop.cpp ('k') | Source/bindings/core/dart/DartJsInteropData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698