tizen beta release
[profile/ivi/webkit-efl.git] / Source / WebCore / inspector / front-end / externs.js
1 /*
2  * Copyright (C) 2011 Google Inc. All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions are
6  * met:
7  *
8  *     * Redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer.
10  *     * Redistributions in binary form must reproduce the above
11  * copyright notice, this list of conditions and the following disclaimer
12  * in the documentation and/or other materials provided with the
13  * distribution.
14  *     * Neither the name of Google Inc. nor the names of its
15  * contributors may be used to endorse or promote products derived from
16  * this software without specific prior written permission.
17  *
18  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29  */
30
31 // WebKit Web Facing API
32 var console = {}
33 /** @param {...*} vararg */
34 console.warn = function(vararg) {}
35 /** @param {...*} vararg */
36 console.assert = function(vararg) {}
37 /** @param {...*} vararg */
38 console.error = function(vararg) {}
39 console.trace = function() {}
40
41 var JSON = {}
42 /** @param {string} str */
43 JSON.parse = function(str) {}
44 /** @param {Object} obj */
45 /** @return {string} */
46 JSON.stringify = function(str) {}
47
48 /** @param {boolean=} param */
49 Element.prototype.scrollIntoViewIfNeeded = function(param) {}
50 /** @type {boolean} */
51 Event.prototype.isMetaOrCtrlForTest = false;
52 /** @param {...*} vararg */
53 Event.prototype.initWebKitWheelEvent = function(vararg) {}
54 /** @param {Element} element */
55 window.getComputedStyle = function(element) {}
56
57 /** @param {boolean=} onlyFirst */
58 Array.prototype.remove = function(obj, onlyFirst) {}
59 Array.prototype.keySet = function() {}
60
61 DOMApplicationCache.prototype.UNCACHED = 0;
62 DOMApplicationCache.prototype.IDLE = 1;
63 DOMApplicationCache.prototype.CHECKING = 2;
64 DOMApplicationCache.prototype.DOWNLOADING = 3;
65 DOMApplicationCache.prototype.UPDATEREADY = 4;
66 DOMApplicationCache.prototype.OBSOLETE = 5;
67
68
69
70 // Inspector Backend
71 var InspectorBackend = {}
72 InspectorBackend.runAfterPendingDispatches = function(message) {}
73
74
75 // FIXME: remove everything below.
76 var WebInspector = {}
77
78 /**
79  * @param {NetworkAgent.RequestId} requestId
80  * @return {?WebInspector.Resource}
81  */
82 WebInspector.networkResourceById = function(requestId)
83 {
84 }
85
86 WebInspector.panels = {};
87
88 /**
89  * @type {WebInspector.InspectorView}
90  */
91 WebInspector.inspectorView;
92
93 /**
94  * @type {WebInspector.ScriptsPanel}
95  */
96 WebInspector.panels.scripts = null;
97
98 /**
99  * @param {WebInspector.View} view
100  */
101 WebInspector.showViewInDrawer = function(view) {}
102
103
104 /**
105  * @param {string=} messageLevel
106  * @param {boolean=} showConsole
107  */
108 WebInspector.log = function(message, messageLevel, showConsole) {}
109
110 WebInspector.addMainEventListeners = function(doc) {}
111
112 WebInspector.openResource = function(url, external) {}
113
114 WebInspector.openRequestInNetworkPanel = function(request) {}
115
116 WebInspector.populateResourceContextMenu = function(contextMenu, url) {}
117
118 WebInspector.evaluateInConsole = function(expression) {}
119
120 var InjectedFakeWorker = function() {}
121
122 WebInspector.queryParamsObject = {}
123
124 WebInspector.Events = {
125     InspectorClosing: "InspectorClosing"
126 }
127
128 /** Extensions API */
129
130 /** @constructor */
131 function AuditCategory() {}
132 /** @constructor */
133 function AuditResult() {}
134 /** @constructor */
135 function EventSink() {}
136 /** @constructor */
137 function ExtensionSidebarPane() {}
138 /** @constructor */
139 function Panel() {}
140 /** @constructor */
141 function PanelWithSidebar() {}
142 /** @constructor */
143 function Request() {}
144 /** @constructor */
145 function Resource() {}
146 /** @constructor */
147 function Timeline() {}
148
149 /** @type {string} */
150 Location.prototype.origin = "";
151
152 /**
153  * @constructor
154  */
155 function ExtensionDescriptor() {
156     this.startPage = "";
157     this.name = "";
158 }
159
160 /**
161  * @constructor
162  */
163 function ExtensionReloadOptions() {
164     this.ignoreCache = false;
165     this.injectedScript = "";
166     this.userAgent = "";
167 }
168
169 /**
170  * @type {WebInspector.HandlerRegistry}
171  */
172 WebInspector.openAnchorLocationRegistry = null;
173
174 /**
175  * @param {WebInspector.Panel} panel
176  */
177 WebInspector.showPanelForAnchorNavigation = function(panel)
178 {
179 }
180
181 WebInspector.showPanel = function(panel)
182 {
183 }
184
185 /**
186  * @type {string} 
187  */
188 WebInspector.inspectedPageDomain;