Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 21 matching lines...) Expand all Loading... | |
| 32 #define DartJsInteropData_h | 32 #define DartJsInteropData_h |
| 33 | 33 |
| 34 #include "wtf/RefCounted.h" | 34 #include "wtf/RefCounted.h" |
| 35 | 35 |
| 36 #include <v8.h> | 36 #include <v8.h> |
| 37 | 37 |
| 38 namespace blink { | 38 namespace blink { |
| 39 | 39 |
| 40 class DartJsInteropData { | 40 class DartJsInteropData { |
| 41 public: | 41 public: |
| 42 DartJsInteropData() { m_jsObjectImplDefined = false; } | |
| 43 | |
| 42 v8::Local<v8::Function> captureThisFunction(); | 44 v8::Local<v8::Function> captureThisFunction(); |
| 43 v8::Local<v8::Function> wrapDartFunction(); | 45 v8::Local<v8::Function> wrapDartFunction(); |
| 44 v8::Local<v8::Function> instanceofFunction(); | 46 v8::Local<v8::Function> instanceofFunction(); |
| 45 | 47 |
| 48 bool jsObjectImplDefined() { return m_jsObjectImplDefined; } | |
|
Jacob
2015/06/18 22:22:44
Needed so that we can determine whether it is too
| |
| 49 void setJsObjectImplDefined() { m_jsObjectImplDefined = true; } | |
| 50 | |
| 46 private: | 51 private: |
| 47 static v8::Local<v8::Function> cacheFunction(v8::Persistent<v8::Function>* c ache, const char* scriptSrc); | 52 static v8::Local<v8::Function> cacheFunction(v8::Persistent<v8::Function>* c ache, const char* scriptSrc); |
| 48 | 53 |
| 49 v8::Persistent<v8::Function> m_captureThisFunction; | 54 v8::Persistent<v8::Function> m_captureThisFunction; |
| 50 v8::Persistent<v8::Function> m_wrapDartFunction; | 55 v8::Persistent<v8::Function> m_wrapDartFunction; |
| 51 v8::Persistent<v8::Function> m_instanceofFunction; | 56 v8::Persistent<v8::Function> m_instanceofFunction; |
| 52 | 57 |
| 58 bool m_jsObjectImplDefined; | |
| 59 | |
| 53 // FIXME: add maps of Dart to V8 and V8 to Dart objects. | 60 // FIXME: add maps of Dart to V8 and V8 to Dart objects. |
| 54 }; | 61 }; |
| 55 | 62 |
| 56 } | 63 } |
| 57 | 64 |
| 58 #endif // DartJsInteropData_h | 65 #endif // DartJsInteropData_h |
| OLD | NEW |