OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 /** | 5 /** |
6 * Dictionary of constants (initialized by browser). | 6 * Dictionary of constants (initialized by browser). |
7 */ | 7 */ |
8 var LogEventType = null; | 8 var LogEventType = null; |
9 var LogEventPhase = null; | 9 var LogEventPhase = null; |
10 var LogSourceType = null; | 10 var LogSourceType = null; |
| 11 var NetError = null; |
| 12 var LoadFlag = null; |
11 | 13 |
12 /** | 14 /** |
13 * Object to communicate between the renderer and the browser. | 15 * Object to communicate between the renderer and the browser. |
14 * @type {!BrowserBridge} | 16 * @type {!BrowserBridge} |
15 */ | 17 */ |
16 var g_browser = null; | 18 var g_browser = null; |
17 | 19 |
18 /** | 20 /** |
19 * Main entry point. called once the page has loaded. | 21 * Main entry point. called once the page has loaded. |
20 */ | 22 */ |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 BrowserBridge.prototype.receivedLogEventPhaseConstants = | 213 BrowserBridge.prototype.receivedLogEventPhaseConstants = |
212 function(constantsMap) { | 214 function(constantsMap) { |
213 LogEventPhase = constantsMap; | 215 LogEventPhase = constantsMap; |
214 }; | 216 }; |
215 | 217 |
216 BrowserBridge.prototype.receivedLogSourceTypeConstants = | 218 BrowserBridge.prototype.receivedLogSourceTypeConstants = |
217 function(constantsMap) { | 219 function(constantsMap) { |
218 LogSourceType = constantsMap; | 220 LogSourceType = constantsMap; |
219 }; | 221 }; |
220 | 222 |
| 223 BrowserBridge.prototype.receivedLoadFlagConstants = function(constantsMap) { |
| 224 LoadFlag = constantsMap; |
| 225 }; |
| 226 |
| 227 BrowserBridge.prototype.receivedNetErrorConstants = function(constantsMap) { |
| 228 NetError = constantsMap; |
| 229 }; |
| 230 |
221 BrowserBridge.prototype.receivedTimeTickOffset = function(timeTickOffset) { | 231 BrowserBridge.prototype.receivedTimeTickOffset = function(timeTickOffset) { |
222 this.timeTickOffset_ = timeTickOffset; | 232 this.timeTickOffset_ = timeTickOffset; |
223 }; | 233 }; |
224 | 234 |
225 BrowserBridge.prototype.receivedProxySettings = function(proxySettings) { | 235 BrowserBridge.prototype.receivedProxySettings = function(proxySettings) { |
226 this.proxySettings_.update(proxySettings); | 236 this.proxySettings_.update(proxySettings); |
227 }; | 237 }; |
228 | 238 |
229 BrowserBridge.prototype.receivedBadProxies = function(badProxies) { | 239 BrowserBridge.prototype.receivedBadProxies = function(badProxies) { |
230 this.badProxies_.update(badProxies); | 240 this.badProxies_.update(badProxies); |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
416 if (prevData && JSON.stringify(prevData) == JSON.stringify(data)) | 426 if (prevData && JSON.stringify(prevData) == JSON.stringify(data)) |
417 return; | 427 return; |
418 | 428 |
419 this.currentData_ = data; | 429 this.currentData_ = data; |
420 | 430 |
421 // Ok, notify the observers of the change. | 431 // Ok, notify the observers of the change. |
422 for (var i = 0; i < this.observers_.length; ++i) | 432 for (var i = 0; i < this.observers_.length; ++i) |
423 var observer = this.observers_[i]; | 433 var observer = this.observers_[i]; |
424 observer[this.observerMethodName_](data); | 434 observer[this.observerMethodName_](data); |
425 }; | 435 }; |
OLD | NEW |