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

Unified Diff: third_party/WebKit/Source/core/testing/Internals.cpp

Issue 2035653006: [DevTools] Move Console to v8 inspector. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: improved api a bit Created 4 years, 6 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/testing/Internals.cpp
diff --git a/third_party/WebKit/Source/core/testing/Internals.cpp b/third_party/WebKit/Source/core/testing/Internals.cpp
index dceb936407ab7b7f161b7444d22711523a124a5f..8918d92c42e49a614732295df34570a489ffd856 100644
--- a/third_party/WebKit/Source/core/testing/Internals.cpp
+++ b/third_party/WebKit/Source/core/testing/Internals.cpp
@@ -94,10 +94,9 @@
#include "core/html/shadow/ShadowElementNames.h"
#include "core/html/shadow/TextControlInnerElements.h"
#include "core/input/EventHandler.h"
-#include "core/inspector/ConsoleMessageStorage.h"
-#include "core/inspector/InspectorConsoleAgent.h"
#include "core/inspector/InspectorInstrumentation.h"
#include "core/inspector/InstanceCounters.h"
+#include "core/inspector/MainThreadDebugger.h"
#include "core/layout/LayoutMenuList.h"
#include "core/layout/LayoutObject.h"
#include "core/layout/LayoutTreeAsText.h"
@@ -1589,17 +1588,28 @@ String Internals::dumpRefCountedInstanceCounts() const
return WTF::dumpRefCountedInstanceCounts();
}
-Vector<String> Internals::consoleMessageArgumentCounts(Document* document) const
+unsigned Internals::numberOfConsoleMessages(Document* document) const
{
- FrameHost* host = document->frameHost();
- if (!host)
- return Vector<String>();
+ if (!document->frame())
+ return 0;
- Vector<unsigned> counts = host->consoleMessageStorage().argumentCounts();
- Vector<String> result(counts.size());
- for (size_t i = 0; i < counts.size(); i++)
- result[i] = String::number(counts[i]);
- return result;
+ MainThreadDebugger* debugger = MainThreadDebugger::instance();
+ unsigned total = 0;
+ unsigned withArguments = 0;
+ debugger->debugger()->consoleMessagesCount(debugger->contextGroupId(document->frame()), &total, &withArguments);
+ return total;
+}
+
+unsigned Internals::numberOfConsoleMessagesWithArguments(Document* document) const
+{
+ if (!document->frame())
+ return 0;
+
+ MainThreadDebugger* debugger = MainThreadDebugger::instance();
+ unsigned total = 0;
+ unsigned withArguments = 0;
+ debugger->debugger()->consoleMessagesCount(debugger->contextGroupId(document->frame()), &total, &withArguments);
+ return withArguments;
}
Vector<unsigned long> Internals::setMemoryCacheCapacities(unsigned long minDeadBytes, unsigned long maxDeadBytes, unsigned long totalBytes)
« no previous file with comments | « third_party/WebKit/Source/core/testing/Internals.h ('k') | third_party/WebKit/Source/core/testing/Internals.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698