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

Unified Diff: src/inspector/v8-console.h

Issue 2801023003: Revert of [inspector] move console to builtins (Closed)
Patch Set: Created 3 years, 8 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 | « src/inspector/inspected-context.cc ('k') | src/inspector/v8-console.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/inspector/v8-console.h
diff --git a/src/inspector/v8-console.h b/src/inspector/v8-console.h
index e31133c4e1653f39d5a5680fce02d21bdf0e93fb..0b833b3c943f37e9171838b8e6b2eba16722f18b 100644
--- a/src/inspector/v8-console.h
+++ b/src/inspector/v8-console.h
@@ -8,7 +8,6 @@
#include "src/base/macros.h"
#include "include/v8.h"
-#include "src/debug/interface-types.h"
namespace v8_inspector {
@@ -17,8 +16,9 @@
// Console API
// https://console.spec.whatwg.org/#console-interface
-class V8Console : public v8::debug::ConsoleDelegate {
+class V8Console {
public:
+ v8::Local<v8::Object> createConsole(v8::Local<v8::Context> context);
v8::Local<v8::Object> createCommandLineAPI(v8::Local<v8::Context> context);
void installMemoryGetter(v8::Local<v8::Context> context,
v8::Local<v8::Object> console);
@@ -49,42 +49,35 @@
explicit V8Console(V8InspectorImpl* inspector);
private:
- void Debug(const v8::debug::ConsoleCallArguments&) override;
- void Error(const v8::debug::ConsoleCallArguments&) override;
- void Info(const v8::debug::ConsoleCallArguments&) override;
- void Log(const v8::debug::ConsoleCallArguments&) override;
- void Warn(const v8::debug::ConsoleCallArguments&) override;
- void Dir(const v8::debug::ConsoleCallArguments&) override;
- void DirXml(const v8::debug::ConsoleCallArguments&) override;
- void Table(const v8::debug::ConsoleCallArguments&) override;
- void Trace(const v8::debug::ConsoleCallArguments&) override;
- void Group(const v8::debug::ConsoleCallArguments&) override;
- void GroupCollapsed(const v8::debug::ConsoleCallArguments&) override;
- void GroupEnd(const v8::debug::ConsoleCallArguments&) override;
- void Clear(const v8::debug::ConsoleCallArguments&) override;
- void Count(const v8::debug::ConsoleCallArguments&) override;
- void Assert(const v8::debug::ConsoleCallArguments&) override;
- void MarkTimeline(const v8::debug::ConsoleCallArguments&) override;
- void Profile(const v8::debug::ConsoleCallArguments&) override;
- void ProfileEnd(const v8::debug::ConsoleCallArguments&) override;
- void Timeline(const v8::debug::ConsoleCallArguments&) override;
- void TimelineEnd(const v8::debug::ConsoleCallArguments&) override;
- void Time(const v8::debug::ConsoleCallArguments&) override;
- void TimeEnd(const v8::debug::ConsoleCallArguments&) override;
- void TimeStamp(const v8::debug::ConsoleCallArguments&) override;
+ void debugCallback(const v8::FunctionCallbackInfo<v8::Value>&);
+ void errorCallback(const v8::FunctionCallbackInfo<v8::Value>&);
+ void infoCallback(const v8::FunctionCallbackInfo<v8::Value>&);
+ void logCallback(const v8::FunctionCallbackInfo<v8::Value>&);
+ void warnCallback(const v8::FunctionCallbackInfo<v8::Value>&);
+ void dirCallback(const v8::FunctionCallbackInfo<v8::Value>&);
+ void dirxmlCallback(const v8::FunctionCallbackInfo<v8::Value>&);
+ void tableCallback(const v8::FunctionCallbackInfo<v8::Value>&);
+ void traceCallback(const v8::FunctionCallbackInfo<v8::Value>&);
+ void groupCallback(const v8::FunctionCallbackInfo<v8::Value>&);
+ void groupCollapsedCallback(const v8::FunctionCallbackInfo<v8::Value>&);
+ void groupEndCallback(const v8::FunctionCallbackInfo<v8::Value>&);
+ void clearCallback(const v8::FunctionCallbackInfo<v8::Value>&);
+ void countCallback(const v8::FunctionCallbackInfo<v8::Value>&);
+ void assertCallback(const v8::FunctionCallbackInfo<v8::Value>&);
+ void markTimelineCallback(const v8::FunctionCallbackInfo<v8::Value>&);
+ void profileCallback(const v8::FunctionCallbackInfo<v8::Value>&);
+ void profileEndCallback(const v8::FunctionCallbackInfo<v8::Value>&);
+ void timelineCallback(const v8::FunctionCallbackInfo<v8::Value>&);
+ void timelineEndCallback(const v8::FunctionCallbackInfo<v8::Value>&);
+ void timeCallback(const v8::FunctionCallbackInfo<v8::Value>&);
+ void timeEndCallback(const v8::FunctionCallbackInfo<v8::Value>&);
+ void timeStampCallback(const v8::FunctionCallbackInfo<v8::Value>&);
template <void (V8Console::*func)(const v8::FunctionCallbackInfo<v8::Value>&)>
static void call(const v8::FunctionCallbackInfo<v8::Value>& info) {
V8Console* console =
static_cast<V8Console*>(info.Data().As<v8::External>()->Value());
(console->*func)(info);
- }
- template <void (V8Console::*func)(const v8::debug::ConsoleCallArguments&)>
- static void call(const v8::FunctionCallbackInfo<v8::Value>& info) {
- V8Console* console =
- static_cast<V8Console*>(info.Data().As<v8::External>()->Value());
- v8::debug::ConsoleCallArguments args(info);
- (console->*func)(args);
}
// TODO(foolip): There is no spec for the Memory Info API, see blink-dev:
« no previous file with comments | « src/inspector/inspected-context.cc ('k') | src/inspector/v8-console.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698