| 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 V8ContextInfo_h | 5 #ifndef V8ContextInfo_h |
| 6 #define V8ContextInfo_h | 6 #define V8ContextInfo_h |
| 7 | 7 |
| 8 #include "platform/inspector_protocol/Collections.h" | 8 #include "platform/inspector_protocol/Collections.h" |
| 9 #include "platform/inspector_protocol/String16.h" | 9 #include "platform/inspector_protocol/String16.h" |
| 10 | 10 |
| 11 #include <v8.h> | 11 #include <v8.h> |
| 12 | 12 |
| 13 namespace blink { | 13 namespace blink { |
| 14 | 14 |
| 15 class V8ContextInfo { | 15 class V8ContextInfo { |
| 16 public: | 16 public: |
| 17 V8ContextInfo(v8::Local<v8::Context> context, int contextGroupId, bool isMai
nInGroup, bool isDefault, const String16& origin, const String16& humanReadableN
ame, const String16& frameId) | 17 V8ContextInfo(v8::Local<v8::Context> context, int contextGroupId, bool isDef
ault, const String16& origin, const String16& humanReadableName, const String16&
frameId) |
| 18 : context(context) | 18 : context(context) |
| 19 , contextGroupId(contextGroupId) | 19 , contextGroupId(contextGroupId) |
| 20 , isMainInGroup(isMainInGroup) | |
| 21 , isDefault(isDefault) | 20 , isDefault(isDefault) |
| 22 , origin(origin) | 21 , origin(origin) |
| 23 , humanReadableName(humanReadableName) | 22 , humanReadableName(humanReadableName) |
| 24 , frameId(frameId) | 23 , frameId(frameId) |
| 25 { | 24 { |
| 26 } | 25 } |
| 27 | 26 |
| 28 v8::Local<v8::Context> context; | 27 v8::Local<v8::Context> context; |
| 29 // Each v8::Context is a part of a group. The group id is used to find appro
priate | 28 // Each v8::Context is a part of a group. The group id is used to find appro
priate |
| 30 // V8DebuggerAgent to notify about events in the context. | 29 // V8DebuggerAgent to notify about events in the context. |
| 31 // |contextGroupId| must be non-0. | 30 // |contextGroupId| must be non-0. |
| 32 int contextGroupId; | 31 int contextGroupId; |
| 33 bool isMainInGroup; | |
| 34 bool isDefault; | 32 bool isDefault; |
| 35 const String16 origin; | 33 const String16 origin; |
| 36 const String16 humanReadableName; | 34 const String16 humanReadableName; |
| 37 const String16 frameId; | 35 const String16 frameId; |
| 38 }; | 36 }; |
| 39 | 37 |
| 40 using V8ContextInfoVector = protocol::Vector<V8ContextInfo>; | 38 using V8ContextInfoVector = protocol::Vector<V8ContextInfo>; |
| 41 | 39 |
| 42 } // namespace blink | 40 } // namespace blink |
| 43 | 41 |
| 44 #endif // V8ContextInfo_h | 42 #endif // V8ContextInfo_h |
| OLD | NEW |