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

Unified Diff: Source/bindings/core/v8/ScheduledActionWithCallback.h

Issue 660863002: [DevTools] Added public method for async execution of scripts (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: platform/WebExecuteScriptCallback -> web/WebScriptCallback Created 6 years, 2 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
Index: Source/bindings/core/v8/ScheduledActionWithCallback.h
diff --git a/Source/bindings/core/v8/ScheduledActionWithCallback.h b/Source/bindings/core/v8/ScheduledActionWithCallback.h
new file mode 100644
index 0000000000000000000000000000000000000000..a98a834a9dbc39a6c00fd7e6fcfb985acac3450e
--- /dev/null
+++ b/Source/bindings/core/v8/ScheduledActionWithCallback.h
@@ -0,0 +1,36 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef ScheduledActionWithCallback_h
+#define ScheduledActionWithCallback_h
+
+#include "bindings/core/v8/ScheduledActionBase.h"
+#include "bindings/core/v8/ScriptSourceCode.h"
+#include "wtf/Forward.h"
+#include <v8.h>
+
+namespace blink {
+
+class LocalFrame;
+class WebScriptCallback;
+
+class ScheduledActionWithCallback : public ScheduledActionBase {
+ WTF_MAKE_NONCOPYABLE(ScheduledActionWithCallback);
+public:
+ // if worldID = 0 only sources.front() will be executed in main world
+ ScheduledActionWithCallback(int worldID, const Vector<ScriptSourceCode>& sources, int extensionGroup, WebScriptCallback*);
+ virtual ~ScheduledActionWithCallback();
+
+private:
+ void execute(LocalFrame*);
+
+ int m_worldID;
+ Vector<ScriptSourceCode> m_sources;
+ int m_extensionGroup;
+ WebScriptCallback* m_callback;
+};
+
+} // namespace blink
+
+#endif // ScheduledActionWithCallback_h

Powered by Google App Engine
This is Rietveld 408576698