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::Local<v8::Object> createConsole(InspectedContext*, bool hasMemory Attribute); | 18 static v8::Local<v8::Object> createConsole(InspectedContext*, bool hasMemory Attribute); |
19 | |
19 static v8::Local<v8::Object> createCommandLineAPI(InspectedContext*); | 20 static v8::Local<v8::Object> createCommandLineAPI(InspectedContext*); |
21 static v8::Local<v8::Object> installCommandLineAPI(v8::Local<v8::Context>, v 8::Local<v8::Object>, v8::Local<v8::Object> commandLineAPI); | |
22 static void clearCommandLineAPI(v8::Local<v8::Context>, v8::Local<v8::Object >, v8::Local<v8::Object> installedMethods); | |
dgozman
2016/06/01 01:25:40
- let's name second parameter "global";
- let's us
kozy
2016/06/01 18:49:22
Done.
| |
23 | |
20 static void clearInspectedContextIfNeeded(v8::Local<v8::Context>, v8::Local< v8::Object> console); | 24 static void clearInspectedContextIfNeeded(v8::Local<v8::Context>, v8::Local< v8::Object> console); |
21 | 25 |
22 private: | 26 private: |
23 static void debugCallback(const v8::FunctionCallbackInfo<v8::Value>&); | 27 static void debugCallback(const v8::FunctionCallbackInfo<v8::Value>&); |
24 static void errorCallback(const v8::FunctionCallbackInfo<v8::Value>&); | 28 static void errorCallback(const v8::FunctionCallbackInfo<v8::Value>&); |
25 static void infoCallback(const v8::FunctionCallbackInfo<v8::Value>&); | 29 static void infoCallback(const v8::FunctionCallbackInfo<v8::Value>&); |
26 static void logCallback(const v8::FunctionCallbackInfo<v8::Value>&); | 30 static void logCallback(const v8::FunctionCallbackInfo<v8::Value>&); |
27 static void warnCallback(const v8::FunctionCallbackInfo<v8::Value>&); | 31 static void warnCallback(const v8::FunctionCallbackInfo<v8::Value>&); |
28 static void dirCallback(const v8::FunctionCallbackInfo<v8::Value>&); | 32 static void dirCallback(const v8::FunctionCallbackInfo<v8::Value>&); |
29 static void dirxmlCallback(const v8::FunctionCallbackInfo<v8::Value>&); | 33 static void dirxmlCallback(const v8::FunctionCallbackInfo<v8::Value>&); |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
62 static void inspectedObject0(const v8::FunctionCallbackInfo<v8::Value>& info ) { inspectedObject(info, 0); } | 66 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); } | 67 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); } | 68 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); } | 69 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); } | 70 static void inspectedObject4(const v8::FunctionCallbackInfo<v8::Value>& info ) { inspectedObject(info, 4); } |
67 }; | 71 }; |
68 | 72 |
69 } // namespace blink | 73 } // namespace blink |
70 | 74 |
71 #endif // V8Console_h | 75 #endif // V8Console_h |
OLD | NEW |