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

Unified Diff: third_party/WebKit/Source/core/inspector/InspectorWebPerfAgent.h

Issue 2238883005: POC for InspectorInstrumentation adding InspectorWebPerfAgent Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add task observer to WebPerfAgent Created 4 years, 4 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: third_party/WebKit/Source/core/inspector/InspectorWebPerfAgent.h
diff --git a/third_party/WebKit/Source/core/inspector/InspectorWebPerfAgent.h b/third_party/WebKit/Source/core/inspector/InspectorWebPerfAgent.h
new file mode 100644
index 0000000000000000000000000000000000000000..8611c6048017bb317ca4347bc203126f74a28587
--- /dev/null
+++ b/third_party/WebKit/Source/core/inspector/InspectorWebPerfAgent.h
@@ -0,0 +1,44 @@
+// Copyright 2016 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 InspectorWebPerfAgent_h
+#define InspectorWebPerfAgent_h
+
+#include "core/CoreExport.h"
+#include "core/inspector/InspectorBaseAgent.h"
+#include "public/platform/WebThread.h"
+
+namespace blink {
+
+class DocumentLoader;
+class LocalFrame;
+class InspectedFrames;
+
+class CORE_EXPORT InspectorWebPerfAgent final
+ : public InspectorAgent
+ , private WebThread::TaskObserver {
+ WTF_MAKE_NONCOPYABLE(InspectorWebPerfAgent);
+public:
+ InspectorWebPerfAgent(InspectedFrames*);
+ ~InspectorWebPerfAgent() override;
+ DECLARE_VIRTUAL_TRACE();
+
+ // Base agent methods.
+ void init(InstrumentingAgents*, protocol::UberDispatcher*, protocol::DictionaryValue*) override {}
+ void dispose() override {}
+
+ // API for InspectorInstrumentation
+ void didCommitLoad(LocalFrame*, DocumentLoader*);
+
+ // WebThread::TaskObserver implementation.
+ void willProcessTask() override;
+ void didProcessTask() override;
+
+private:
+ Member<InspectedFrames> m_inspectedFrames;
+};
+
+} // namespace blink
+
+#endif // InspectorWebPerfAgent_h

Powered by Google App Engine
This is Rietveld 408576698