author | Eugene Ostroukhov <eugeneo@symbian.org> |
Fri, 11 Jun 2010 13:33:03 -0700 | |
changeset 372 | 1e408ee32d8a |
parent 355 | 8726e95bcbba |
permissions | -rw-r--r-- |
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; |
|
6 |
||
7 |
||
8 |
/** |
|
9 |
* An objects that holds data for a "script" which is a part of a resource |
|
10 |
* loaded into the browser, identified by its original document URL, line offset |
|
11 |
* in the original document, and the line count this script spans. |
|
12 |
*/ |
|
13 |
public interface Script { |
|
14 |
||
15 |
/** |
|
16 |
* Denotes a script type. |
|
17 |
*/ |
|
18 |
enum Type { |
|
19 |
/** A native, internal JavaScript VM script */ |
|
20 |
NATIVE, |
|
21 |
||
22 |
/** A script supplied by an extension */ |
|
23 |
EXTENSION, |
|
24 |
||
25 |
/** A normal user script */ |
|
26 |
NORMAL |
|
27 |
} |
|
28 |
||
29 |
/** |
|
30 |
* @return the script type |
|
31 |
*/ |
|
32 |
Type getType(); |
|
33 |
||
34 |
/** |
|
35 |
* @return the original document URL for this script known by Chromium. |
|
36 |
* A null name for eval'd scripts |
|
37 |
*/ |
|
38 |
String getName(); |
|
39 |
||
40 |
/** |
|
41 |
* @return the script ID as reported by the JavaScript VM debugger |
|
42 |
*/ |
|
43 |
long getId(); |
|
44 |
||
45 |
/** |
|
46 |
* @return the start line of this script in the original document |
|
355
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
2
diff
changeset
|
47 |
* (zero-based) |
2 | 48 |
*/ |
49 |
int getStartLine(); |
|
50 |
||
51 |
/** |
|
355
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
2
diff
changeset
|
52 |
* @return the start column of this script in the original document |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
2
diff
changeset
|
53 |
* (zero-based) |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
2
diff
changeset
|
54 |
*/ |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
2
diff
changeset
|
55 |
int getStartColumn(); |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
2
diff
changeset
|
56 |
|
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
2
diff
changeset
|
57 |
/** |
2 | 58 |
* @return the end line of this script in the original document (zero-based), |
59 |
* inclusive |
|
60 |
*/ |
|
61 |
int getEndLine(); |
|
62 |
||
63 |
/** |
|
64 |
* @return the currently set source text of this script |
|
65 |
*/ |
|
66 |
String getSource(); |
|
67 |
||
68 |
/** |
|
69 |
* @return whether the source for this script is known |
|
70 |
*/ |
|
71 |
boolean hasSource(); |
|
72 |
||
73 |
} |