1 /* 2 * Copyright (C) 2009 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 if (!window.InspectorBackend) { 32 33 WebInspector.InspectorBackendStub = function() 34 { 35 this._searchingForNode = false; 36 this._attachedWindowHeight = 0; 37 this._debuggerEnabled = true; 38 this._profilerEnabled = true; 39 this._resourceTrackingEnabled = false; 40 this._timelineEnabled = false; 41 } 42 43 WebInspector.InspectorBackendStub.prototype = { 44 wrapCallback: function(func) 45 { 46 return func; 47 }, 48 49 closeWindow: function() 50 { 51 this._windowVisible = false; 52 }, 53 54 attach: function() 55 { 56 }, 57 58 detach: function() 59 { 60 }, 61 62 storeLastActivePanel: function(panel) 63 { 64 }, 65 66 clearMessages: function() 67 { 68 }, 69 70 searchingForNode: function() 71 { 72 return this._searchingForNode; 73 }, 74 75 search: function(sourceRow, query) 76 { 77 }, 78 79 toggleNodeSearch: function() 80 { 81 this._searchingForNode = !this._searchingForNode; 82 }, 83 84 setAttachedWindowHeight: function(height) 85 { 86 }, 87 88 moveByUnrestricted: function(x, y) 89 { 90 }, 91 92 getResourceContent: function(callId, identifier) 93 { 94 WebInspector.didGetResourceContent(callId, ""); 95 }, 96 97 highlightDOMNode: function(node) 98 { 99 }, 100 101 hideDOMNodeHighlight: function() 102 { 103 }, 104 105 inspectedWindow: function() 106 { 107 return window; 108 }, 109 110 loaded: function() 111 { 112 }, 113 114 localizedStringsURL: function() 115 { 116 return undefined; 117 }, 118 119 windowUnloading: function() 120 { 121 return false; 122 }, 123 124 hiddenPanels: function() 125 { 126 return ""; 127 }, 128 129 debuggerEnabled: function() 130 { 131 return this._debuggerEnabled; 132 }, 133 134 enableResourceTracking: function() 135 { 136 this._resourceTrackingEnabled = true; 137 WebInspector.resourceTrackingWasEnabled(); 138 }, 139 140 disableResourceTracking: function() 141 { 142 this._resourceTrackingEnabled = false; 143 WebInspector.resourceTrackingWasDisabled(); 144 }, 145 146 resourceTrackingEnabled: function() 147 { 148 return this._resourceTrackingEnabled; 149 }, 150 151 enableDebugger: function() 152 { 153 this._debuggerEnabled = true; 154 }, 155 156 disableDebugger: function() 157 { 158 this._debuggerEnabled = false; 159 }, 160 161 addBreakpoint: function(sourceID, line, condition) 162 { 163 }, 164 165 removeBreakpoint: function(sourceID, line) 166 { 167 }, 168 169 updateBreakpoint: function(sourceID, line, condition) 170 { 171 }, 172 173 pauseInDebugger: function() 174 { 175 }, 176 177 pauseOnExceptionsState: function() 178 { 179 return 0; 180 }, 181 182 setPauseOnExceptionsState: function(value) 183 { 184 }, 185 186 resumeDebugger: function() 187 { 188 }, 189 190 profilerEnabled: function() 191 { 192 return true; 193 }, 194 195 enableProfiler: function() 196 { 197 this._profilerEnabled = true; 198 }, 199 200 disableProfiler: function() 201 { 202 this._profilerEnabled = false; 203 }, 204 205 startProfiling: function() 206 { 207 }, 208 209 stopProfiling: function() 210 { 211 }, 212 213 getProfileHeaders: function(callId) 214 { 215 WebInspector.didGetProfileHeaders(callId, []); 216 }, 217 218 getProfile: function(callId, uid) 219 { 220 if (WebInspector.__fullProfiles && (uid in WebInspector.__fullProfiles)) 221 { 222 WebInspector.didGetProfile(callId, WebInspector.__fullProfiles[uid]); 223 } 224 }, 225 226 takeHeapSnapshot: function() 227 { 228 }, 229 230 databaseTableNames: function(database) 231 { 232 return []; 233 }, 234 235 stepIntoStatementInDebugger: function() 236 { 237 }, 238 239 stepOutOfFunctionInDebugger: function() 240 { 241 }, 242 243 stepOverStatementInDebugger: function() 244 { 245 }, 246 247 saveFrontendSettings: function() 248 { 249 }, 250 251 dispatchOnInjectedScript: function() 252 { 253 }, 254 255 releaseWrapperObjectGroup: function() 256 { 257 }, 258 259 setInjectedScriptSource: function() 260 { 261 } 262 } 263 264 InspectorBackend = new WebInspector.InspectorBackendStub(); 265 266 } 267