| 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.internal; | 5 package org.chromium.sdk.internal; |
| 6 | 6 |
| 7 import java.io.IOException; | 7 import java.io.IOException; |
| 8 | 8 |
| 9 import org.chromium.sdk.Breakpoint; | 9 import org.chromium.sdk.Breakpoint; |
| 10 import org.chromium.sdk.CallbackSemaphore; | 10 import org.chromium.sdk.CallbackSemaphore; |
| 11 import org.chromium.sdk.JavascriptVm; | 11 import org.chromium.sdk.JavascriptVm; |
| 12 import org.chromium.sdk.SyncCallback; | 12 import org.chromium.sdk.SyncCallback; |
| 13 import org.chromium.sdk.JavascriptVm.ExceptionCatchType; |
| 14 import org.chromium.sdk.JavascriptVm.SetValueCallback; |
| 13 import org.chromium.sdk.internal.tools.v8.MethodIsBlockingException; | 15 import org.chromium.sdk.internal.tools.v8.MethodIsBlockingException; |
| 14 | 16 |
| 15 /** | 17 /** |
| 16 * Base implementation of JavascriptVm. | 18 * Base implementation of JavascriptVm. |
| 17 */ | 19 */ |
| 18 public abstract class JavascriptVmImpl implements JavascriptVm { | 20 public abstract class JavascriptVmImpl implements JavascriptVm { |
| 19 | 21 |
| 20 protected JavascriptVmImpl() { | 22 protected JavascriptVmImpl() { |
| 21 } | 23 } |
| 22 | 24 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 39 BreakpointCallback callback, SyncCallback syncCallback) { | 41 BreakpointCallback callback, SyncCallback syncCallback) { |
| 40 getDebugSession().getBreakpointManager() | 42 getDebugSession().getBreakpointManager() |
| 41 .setBreakpoint(type, target, line, position, enabled, condition, ignoreC
ount, callback, | 43 .setBreakpoint(type, target, line, position, enabled, condition, ignoreC
ount, callback, |
| 42 syncCallback); | 44 syncCallback); |
| 43 } | 45 } |
| 44 | 46 |
| 45 public void listBreakpoints(final ListBreakpointsCallback callback, SyncCallba
ck syncCallback) { | 47 public void listBreakpoints(final ListBreakpointsCallback callback, SyncCallba
ck syncCallback) { |
| 46 getDebugSession().getBreakpointManager().reloadBreakpoints(callback, syncCal
lback); | 48 getDebugSession().getBreakpointManager().reloadBreakpoints(callback, syncCal
lback); |
| 47 } | 49 } |
| 48 | 50 |
| 49 public void enableBreakpoints(boolean enabled, Void callback, SyncCallback syn
cCallback) { | 51 public void enableBreakpoints(Boolean enabled, SetValueCallback<Boolean> callb
ack, |
| 52 SyncCallback syncCallback) { |
| 50 getDebugSession().getBreakpointManager().enableBreakpoints(enabled, callback
, syncCallback); | 53 getDebugSession().getBreakpointManager().enableBreakpoints(enabled, callback
, syncCallback); |
| 51 } | 54 } |
| 52 | 55 |
| 56 public void setBreakOnException(ExceptionCatchType catchType, Boolean enabled, |
| 57 SetValueCallback<Boolean> callback, SyncCallback syncCallback) { |
| 58 getDebugSession().getBreakpointManager().setBreakOnException(catchType, enab
led, |
| 59 callback, syncCallback); |
| 60 } |
| 61 |
| 53 protected abstract DebugSession getDebugSession(); | 62 protected abstract DebugSession getDebugSession(); |
| 54 | 63 |
| 55 // TODO(peter.rybin): This message will be obsolete in JavaSE-1.6. | 64 // TODO(peter.rybin): This message will be obsolete in JavaSE-1.6. |
| 56 public static IOException newIOException(String message, Throwable cause) { | 65 public static IOException newIOException(String message, Throwable cause) { |
| 57 IOException result = new IOException(message); | 66 IOException result = new IOException(message); |
| 58 result.initCause(cause); | 67 result.initCause(cause); |
| 59 return result; | 68 return result; |
| 60 } | 69 } |
| 61 } | 70 } |
| OLD | NEW |