|
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
|
2 // Use of this source code is governed by a BSD-style license that can be |
|
3 // found in the LICENSE file. |
|
4 |
|
5 package org.chromium.sdk.internal.tools.v8.request; |
|
6 |
|
7 import java.util.List; |
|
8 |
|
9 import org.chromium.sdk.internal.tools.v8.DebuggerCommand; |
|
10 |
|
11 /** |
|
12 * Represents a "scripts" V8 request message. |
|
13 */ |
|
14 public class ScriptsMessage extends ContextlessDebuggerMessage { |
|
15 |
|
16 /** |
|
17 * Native scripts constant. |
|
18 */ |
|
19 public static final int SCRIPTS_NATIVE = 1 << 0; |
|
20 |
|
21 /** |
|
22 * Extension scripts constant. |
|
23 */ |
|
24 public static final int SCRIPTS_EXTENSION = 1 << 1; |
|
25 |
|
26 /** |
|
27 * Normal scripts constant. |
|
28 */ |
|
29 public static final int SCRIPTS_NORMAL = 1 << 2; |
|
30 |
|
31 /** |
|
32 * @param types a bitwise OR of script types to retrieve |
|
33 * @param includeSource whether to include script source in the response, |
|
34 * default is false |
|
35 */ |
|
36 public ScriptsMessage(Integer types, Boolean includeSource) { |
|
37 super(DebuggerCommand.SCRIPTS.value); |
|
38 putArgument("types", types); |
|
39 putArgument("includeSource", includeSource); |
|
40 } |
|
41 |
|
42 /** |
|
43 * @param ids of scripts to retrieve |
|
44 * @param includeSource whether to include script source in the response, |
|
45 * default is false |
|
46 */ |
|
47 public ScriptsMessage(List<Long> ids, Boolean includeSource) { |
|
48 super(DebuggerCommand.SCRIPTS.value); |
|
49 putArgument("ids", ids); |
|
50 putArgument("includeSource", includeSource); |
|
51 } |
|
52 } |