equal
deleted
inserted
replaced
5 package org.chromium.sdk; |
5 package org.chromium.sdk; |
6 |
6 |
7 /** |
7 /** |
8 * A breakpoint in the browser JavaScript virtual machine. The {@code set*} |
8 * A breakpoint in the browser JavaScript virtual machine. The {@code set*} |
9 * method invocations will not take effect until |
9 * method invocations will not take effect until |
10 * {@link #flush(org.chromium.sdk.BrowserTab.BreakpointCallback)} is called. |
10 * {@link #flush(org.chromium.sdk.JavascriptVm.BreakpointCallback)} is called. |
11 */ |
11 */ |
12 public interface Breakpoint { |
12 public interface Breakpoint { |
13 |
13 |
14 /** |
14 /** |
15 * Known breakpoint types. |
15 * Known breakpoint types. |
23 /** |
23 /** |
24 * This value is used when the corresponding parameter is absent. |
24 * This value is used when the corresponding parameter is absent. |
25 * |
25 * |
26 * @see #getIgnoreCount() |
26 * @see #getIgnoreCount() |
27 * @see #setIgnoreCount(int) |
27 * @see #setIgnoreCount(int) |
28 * @see BrowserTab#setBreakpoint(Type, String, int, int, boolean, String, int, org.chromium.sdk.BrowserTab.BreakpointCallback) |
28 * @see JavascriptVm#setBreakpoint |
29 */ |
29 */ |
30 int EMPTY_VALUE = -1; |
30 int EMPTY_VALUE = -1; |
31 |
31 |
32 /** |
32 /** |
33 * A breakpoint has this ID if it does not reflect an actual breakpoint in a |
33 * A breakpoint has this ID if it does not reflect an actual breakpoint in a |
42 |
42 |
43 /** |
43 /** |
44 * @return the breakpoint ID as reported by the JavaScript VM debugger |
44 * @return the breakpoint ID as reported by the JavaScript VM debugger |
45 */ |
45 */ |
46 long getId(); |
46 long getId(); |
|
47 |
|
48 /** |
|
49 * @return scriptName as reported by the JavaScript VM debugger; may be null |
|
50 */ |
|
51 String getScriptName(); |
|
52 |
|
53 /** |
|
54 * @return scriptId as reported by the JavaScript VM debugger; may be null |
|
55 */ |
|
56 Long getScriptId(); |
|
57 |
|
58 /** |
|
59 * Returns line number of the breakpoint. As source is changed (typically with LiveEdit feature, |
|
60 * and particularly by calling {@link UpdatableScript#setSourceOnRemote}) this value |
|
61 * may become stale. It gets updated when {@link JavascriptVm#listBreakpoints} asynchronous |
|
62 * method completes. |
|
63 * |
|
64 * @return 1-based line number in script source |
|
65 */ |
|
66 long getLineNumber(); |
47 |
67 |
48 /** |
68 /** |
49 * @return whether this breakpoint is enabled |
69 * @return whether this breakpoint is enabled |
50 */ |
70 */ |
51 boolean isEnabled(); |
71 boolean isEnabled(); |
86 * callback once the operation has finished. This operation does not require |
106 * callback once the operation has finished. This operation does not require |
87 * a flush() invocation. |
107 * a flush() invocation. |
88 * |
108 * |
89 * @param callback to invoke once the operation result is available |
109 * @param callback to invoke once the operation result is available |
90 */ |
110 */ |
91 void clear(BrowserTab.BreakpointCallback callback); |
111 void clear(JavascriptVm.BreakpointCallback callback, SyncCallback syncCallback); |
92 |
112 |
93 /** |
113 /** |
94 * Flushes the breakpoint parameter changes (set* methods) into the browser |
114 * Flushes the breakpoint parameter changes (set* methods) into the browser |
95 * and invokes the callback once the operation has finished. This method must |
115 * and invokes the callback once the operation has finished. This method must |
96 * be called for the set* method invocations to take effect. |
116 * be called for the set* method invocations to take effect. |
97 * |
117 * |
98 * @param callback to invoke once the operation result is available |
118 * @param callback to invoke once the operation result is available |
99 */ |
119 */ |
100 void flush(BrowserTab.BreakpointCallback callback); |
120 void flush(JavascriptVm.BreakpointCallback callback, SyncCallback syncCallback); |
101 } |
121 } |