OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 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 | 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 package org.chromium.sdk; | 5 package org.chromium.sdk; |
6 | 6 |
7 import java.util.Collection; | 7 import java.util.Collection; |
8 | 8 |
9 import org.chromium.sdk.internal.tools.v8.MethodIsBlockingException; | 9 import org.chromium.sdk.internal.tools.v8.MethodIsBlockingException; |
10 | 10 |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 void failure(Exception exception); | 113 void failure(Exception exception); |
114 } | 114 } |
115 | 115 |
116 /** | 116 /** |
117 * Asynchronously reads breakpoints from remote VM. The now-effective collecti
on of breakpoints | 117 * Asynchronously reads breakpoints from remote VM. The now-effective collecti
on of breakpoints |
118 * is returned to callback. Already existing {@link Breakpoint} instances are
preserved. | 118 * is returned to callback. Already existing {@link Breakpoint} instances are
preserved. |
119 */ | 119 */ |
120 void listBreakpoints(ListBreakpointsCallback callback, SyncCallback syncCallba
ck); | 120 void listBreakpoints(ListBreakpointsCallback callback, SyncCallback syncCallba
ck); |
121 | 121 |
122 /** | 122 /** |
123 * Asynchronously enables or disables all breakpoints on remote. | 123 * A generic callback used in operations that a remote variable value. |
124 * @param callback argument reserved for future, should be null | |
125 */ | 124 */ |
126 void enableBreakpoints(boolean enabled, Void callback, SyncCallback syncCallba
ck); | 125 interface SetValueCallback<T> { |
| 126 /** |
| 127 * Method is called after variable has been successfully updated. |
| 128 * @param value holds an actual new value of variable if provided or null |
| 129 */ |
| 130 void success(T value); |
| 131 void failure(Exception exception); |
| 132 } |
| 133 |
| 134 /** |
| 135 * Asynchronously enables or disables all breakpoints on remote. Parameter |
| 136 * 'enabled' may be null, in this case the remote value is not modified and ca
n be |
| 137 * obtained inside the callback. |
| 138 */ |
| 139 void enableBreakpoints(Boolean enabled, SetValueCallback<Boolean> callback, |
| 140 SyncCallback syncCallback); |
| 141 |
| 142 enum ExceptionCatchType { |
| 143 CAUGHT, UNCAUGHT |
| 144 } |
| 145 |
| 146 /** |
| 147 * Asynchronously enables or disables breaking on exception. All exception |
| 148 * events are split into 2 categories: caught and uncaught. Parameter |
| 149 * 'enabled' may be null, in this case the remote value is not modified and ca
n be |
| 150 * obtained inside the callback. |
| 151 */ |
| 152 void setBreakOnException(ExceptionCatchType catchType, Boolean enabled, |
| 153 SetValueCallback<Boolean> callback, SyncCallback syncCallback); |
127 } | 154 } |
OLD | NEW |