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.tools;
|
|
6 |
|
|
7 |
import org.chromium.sdk.internal.transport.Message;
|
|
8 |
|
|
9 |
/**
|
|
10 |
* An interface of a tool handler to which responses from certain tools are
|
|
11 |
* dispatched.
|
|
12 |
*/
|
|
13 |
public interface ToolHandler {
|
|
14 |
|
|
15 |
/**
|
|
16 |
* Handles message from a certain tool.
|
|
17 |
* Invoked from Dispatch thread (connection-driven).
|
|
18 |
*
|
|
19 |
* @param message to handle. Never null
|
|
20 |
*/
|
|
21 |
void handleMessage(Message message);
|
|
22 |
|
|
23 |
/**
|
|
24 |
* Handles EOS (end-of-stream) message. Should not be called twice. Implementation
|
|
25 |
* may rely on this in its clean-up work.
|
|
26 |
* Invoked from Dispatch thread (connection-driven).
|
|
27 |
*/
|
|
28 |
void handleEos();
|
|
29 |
|
|
30 |
/**
|
|
31 |
* Gets invoked when the debugger has detached from a browser instance (due to
|
|
32 |
* the connection loss or a user request).
|
|
33 |
*/
|
|
34 |
void onDebuggerDetached();
|
|
35 |
}
|