| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8Console_h | 5 #ifndef V8Console_h |
| 6 #define V8Console_h | 6 #define V8Console_h |
| 7 | 7 |
| 8 #include <v8.h> | 8 #include <v8.h> |
| 9 | 9 |
| 10 namespace blink { | 10 namespace blink { |
| 11 | 11 |
| 12 class InspectedContext; | 12 class InspectedContext; |
| 13 | 13 |
| 14 // Console API | 14 // Console API |
| 15 // https://console.spec.whatwg.org/#console-interface | 15 // https://console.spec.whatwg.org/#console-interface |
| 16 class V8Console { | 16 class V8Console { |
| 17 public: | 17 public: |
| 18 static v8::MaybeLocal<v8::Object> createConsole(InspectedContext*, bool hasM
emoryAttribute); | 18 static v8::Local<v8::Object> createConsole(InspectedContext*, bool hasMemory
Attribute); |
| 19 static v8::Local<v8::Object> createCommandLineAPI(InspectedContext*); | 19 static v8::Local<v8::Object> createCommandLineAPI(InspectedContext*); |
| 20 static void clearInspectedContextIfNeeded(v8::Local<v8::Context>, v8::Local<
v8::Object> console); | 20 static void clearInspectedContextIfNeeded(v8::Local<v8::Context>, v8::Local<
v8::Object> console); |
| 21 | 21 |
| 22 private: | 22 private: |
| 23 static void debugCallback(const v8::FunctionCallbackInfo<v8::Value>&); | 23 static void debugCallback(const v8::FunctionCallbackInfo<v8::Value>&); |
| 24 static void errorCallback(const v8::FunctionCallbackInfo<v8::Value>&); | 24 static void errorCallback(const v8::FunctionCallbackInfo<v8::Value>&); |
| 25 static void infoCallback(const v8::FunctionCallbackInfo<v8::Value>&); | 25 static void infoCallback(const v8::FunctionCallbackInfo<v8::Value>&); |
| 26 static void logCallback(const v8::FunctionCallbackInfo<v8::Value>&); | 26 static void logCallback(const v8::FunctionCallbackInfo<v8::Value>&); |
| 27 static void warnCallback(const v8::FunctionCallbackInfo<v8::Value>&); | 27 static void warnCallback(const v8::FunctionCallbackInfo<v8::Value>&); |
| 28 static void dirCallback(const v8::FunctionCallbackInfo<v8::Value>&); | 28 static void dirCallback(const v8::FunctionCallbackInfo<v8::Value>&); |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 static void inspectedObject0(const v8::FunctionCallbackInfo<v8::Value>& info
) { inspectedObject(info, 0); } | 62 static void inspectedObject0(const v8::FunctionCallbackInfo<v8::Value>& info
) { inspectedObject(info, 0); } |
| 63 static void inspectedObject1(const v8::FunctionCallbackInfo<v8::Value>& info
) { inspectedObject(info, 1); } | 63 static void inspectedObject1(const v8::FunctionCallbackInfo<v8::Value>& info
) { inspectedObject(info, 1); } |
| 64 static void inspectedObject2(const v8::FunctionCallbackInfo<v8::Value>& info
) { inspectedObject(info, 2); } | 64 static void inspectedObject2(const v8::FunctionCallbackInfo<v8::Value>& info
) { inspectedObject(info, 2); } |
| 65 static void inspectedObject3(const v8::FunctionCallbackInfo<v8::Value>& info
) { inspectedObject(info, 3); } | 65 static void inspectedObject3(const v8::FunctionCallbackInfo<v8::Value>& info
) { inspectedObject(info, 3); } |
| 66 static void inspectedObject4(const v8::FunctionCallbackInfo<v8::Value>& info
) { inspectedObject(info, 4); } | 66 static void inspectedObject4(const v8::FunctionCallbackInfo<v8::Value>& info
) { inspectedObject(info, 4); } |
| 67 }; | 67 }; |
| 68 | 68 |
| 69 } // namespace blink | 69 } // namespace blink |
| 70 | 70 |
| 71 #endif // V8Console_h | 71 #endif // V8Console_h |
| OLD | NEW |