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

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

Issue 1198863006: First version of PerformanceObserver (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Sync with latest spec draft (DOMString -> PerformanceEntryType and new PerformanceObserver -> windo… 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 side-by-side diff with in-line comments
Download patch
Index: Source/bindings/core/v8/V8PerformanceObserverCallback.h
diff --git a/Source/bindings/core/v8/V8PerformanceObserverCallback.h b/Source/bindings/core/v8/V8PerformanceObserverCallback.h
new file mode 100644
index 0000000000000000000000000000000000000000..82c63b9a9289bb91508997a27496347cc1718ed3
--- /dev/null
+++ b/Source/bindings/core/v8/V8PerformanceObserverCallback.h
@@ -0,0 +1,40 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
esprehn 2015/07/18 22:24:15 15
MikeB 2015/07/20 23:06:50 I updated the template for code_generator_v8.py
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY!
esprehn 2015/07/18 22:24:15 ??? I don't think this is supposed to be here.
MikeB 2015/07/20 23:06:50 I actually did generate this file. I had to add li
+
+#ifndef V8PerformanceObserverCallback_h
+#define V8PerformanceObserverCallback_h
+
+#include "bindings/core/v8/ActiveDOMCallback.h"
+#include "bindings/core/v8/DOMWrapperWorld.h"
+#include "bindings/core/v8/ScopedPersistent.h"
+#include "core/CoreExport.h"
+#include "core/timing/PerformanceObserverCallback.h"
+
+namespace blink {
+
+class V8PerformanceObserverCallback final : public PerformanceObserverCallback, public ActiveDOMCallback {
+ WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(V8PerformanceObserverCallback);
+public:
+ static V8PerformanceObserverCallback* create(v8::Local<v8::Function> callback, ScriptState* scriptState)
+ {
+ return new V8PerformanceObserverCallback(callback, scriptState);
+ }
+
+ ~V8PerformanceObserverCallback() override;
+
+ DECLARE_VIRTUAL_TRACE();
+
+ void handleEvent(PerformanceObserverEntryList*, PerformanceObserver*) override;
+ ExecutionContext* executionContext() const override { return ContextLifecycleObserver::executionContext(); }
+private:
+ CORE_EXPORT V8PerformanceObserverCallback(v8::Local<v8::Function>, ScriptState*);
+
+ ScopedPersistent<v8::Function> m_callback;
+ RefPtr<ScriptState> m_scriptState;
+};
+
+}
+#endif // V8PerformanceObserverCallback_h

Powered by Google App Engine
This is Rietveld 408576698