2
|
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;
|
|
6 |
|
|
7 |
import org.chromium.sdk.SyncCallback;
|
|
8 |
import org.chromium.sdk.internal.tools.v8.V8CommandProcessor;
|
|
9 |
import org.chromium.sdk.internal.tools.v8.V8CommandSender;
|
|
10 |
import org.chromium.sdk.internal.tools.v8.request.DebuggerMessage;
|
|
11 |
|
|
12 |
/**
|
|
13 |
* Internal API to DebugContext implementation. The actual object might
|
|
14 |
* be hidden deep inside, so we need an interface. Do not try to cast
|
|
15 |
* DebugContext to this interface -- technically they might be different
|
|
16 |
* objects.
|
|
17 |
*/
|
|
18 |
public interface InternalContext extends V8CommandSender<DebuggerMessage,
|
|
19 |
InternalContext.ContextDismissedCheckedException> {
|
|
20 |
/**
|
|
21 |
* Context belongs to a particular {@code DebugSession}.
|
|
22 |
* @return DebugSession this context belongs to
|
|
23 |
*/
|
|
24 |
DebugSession getDebugSession();
|
|
25 |
|
|
26 |
ContextBuilder getContextBuilder();
|
|
27 |
|
|
28 |
// TODO(peter.rybin): document this
|
|
29 |
boolean isValid();
|
|
30 |
|
|
31 |
/**
|
|
32 |
* Handle manager makes sense only for a particular context.
|
|
33 |
* @return HandleManager of this context
|
|
34 |
*/
|
|
35 |
HandleManager getHandleManager();
|
|
36 |
|
|
37 |
CallFrameImpl getTopFrameImpl();
|
|
38 |
|
|
39 |
/**
|
|
40 |
* Sends V8 command message provided this context is still valid. There is no
|
|
41 |
* way of making sure context will be valid via this API.
|
|
42 |
* @throws ContextDismissedCheckedException if context is not valid anymore
|
|
43 |
*/
|
|
44 |
void sendV8CommandAsync(DebuggerMessage message, boolean isImmediate,
|
|
45 |
V8CommandProcessor.V8HandlerCallback commandCallback, SyncCallback syncCallback)
|
|
46 |
throws ContextDismissedCheckedException;
|
|
47 |
|
|
48 |
class ContextDismissedCheckedException extends Exception {
|
|
49 |
}
|
|
50 |
|
|
51 |
ValueLoader getValueLoader();
|
|
52 |
}
|