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

Unified Diff: sky/engine/bindings-dart/common/ScriptValue.cpp

Issue 875013003: Import Dart bindings as of Blink r188698. This merely copies the files over and does not attach any… (Closed) Base URL: https://github.com/domokit/mojo.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/engine/bindings-dart/common/ScriptValue.h ('k') | sky/engine/bindings-dart/common/ScriptWrappable.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/bindings-dart/common/ScriptValue.cpp
diff --git a/sky/engine/public/web/WebLeakDetector.h b/sky/engine/bindings-dart/common/ScriptValue.cpp
similarity index 61%
copy from sky/engine/public/web/WebLeakDetector.h
copy to sky/engine/bindings-dart/common/ScriptValue.cpp
index 36d28d8cec056d0868bafb2dc8de6453f032699c..f88193903a18cada0b097e8eaaf3adc7d6f7b30c 100644
--- a/sky/engine/public/web/WebLeakDetector.h
+++ b/sky/engine/bindings-dart/common/ScriptValue.cpp
@@ -28,38 +28,48 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef SKY_ENGINE_PUBLIC_WEB_WEBLEAKDETECTOR_H_
-#define SKY_ENGINE_PUBLIC_WEB_WEBLEAKDETECTOR_H_
+#include "config.h"
+#include "bindings/common/ScriptValue.h"
-#include "sky/engine/public/platform/WebCommon.h"
-#include "sky/engine/public/web/WebFrame.h"
+#include "modules/indexeddb/IDBKey.h"
+#include "modules/indexeddb/IDBKeyRange.h"
+#include "platform/JSONValues.h"
namespace blink {
-class WebLeakDetectorClient {
-public:
- struct Result {
- unsigned numberOfLiveAudioNodes;
- unsigned numberOfLiveDocuments;
- unsigned numberOfLiveNodes;
- unsigned numberOfLiveRenderObjects;
- unsigned numberOfLiveResources;
- };
+PassRefPtr<JSONValue> ScriptValue::toJSONValue(ScriptState* state) const
+{
+ return m_implScriptValue->toJSONValue(state);
+}
- virtual void onLeakDetectionComplete(const Result&) = 0;
-};
+ScriptPromise ScriptValue::toPromise() const
+{
+ return ScriptPromise(m_implScriptValue->toPromise());
+}
-class WebLeakDetector {
-public:
- virtual ~WebLeakDetector() { }
+ScriptPromise ScriptValue::toRejectedPromise() const
+{
+ return ScriptPromise(m_implScriptValue->toRejectedPromise());
+}
- BLINK_EXPORT static WebLeakDetector* create(WebLeakDetectorClient*);
+IDBKey* ScriptValue::createIDBKeyFromKeyPath(const IDBKeyPath& keyPath) const
+{
+ return m_implScriptValue->createIDBKeyFromKeyPath(keyPath);
+}
- // Cleans up the DOM objects and counts them. |WebLeakDetectorClient::onLeakDetectionComplete()| is called when done.
- // This is supposed to be used for detecting DOM-object leaks.
- virtual void collectGarbageAndGetDOMCounts(WebLocalFrame*) = 0;
-};
+bool ScriptValue::canInjectIDBKey(const IDBKeyPath& keyPath) const
+{
+ return m_implScriptValue->canInjectIDBKey(keyPath);
+}
-} // namespace blink
+IDBKey* ScriptValue::toIDBKey() const
+{
+ return m_implScriptValue->toIDBKey();
+}
+
+IDBKeyRange* ScriptValue::toIDBKeyRange() const
+{
+ return m_implScriptValue->toIDBKeyRange();
+}
-#endif // SKY_ENGINE_PUBLIC_WEB_WEBLEAKDETECTOR_H_
+} // namespace blink
« no previous file with comments | « sky/engine/bindings-dart/common/ScriptValue.h ('k') | sky/engine/bindings-dart/common/ScriptWrappable.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698