| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 * This class provides a "bridge" for communicating between the javascript and | 6 * This class provides a "bridge" for communicating between the javascript and |
| 7 * the browser. | 7 * the browser. |
| 8 */ | 8 */ |
| 9 var BrowserBridge = (function() { | 9 var BrowserBridge = (function() { |
| 10 'use strict'; | 10 'use strict'; |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 }, | 193 }, |
| 194 | 194 |
| 195 sendGetSessionNetworkStats: function() { | 195 sendGetSessionNetworkStats: function() { |
| 196 this.send('getSessionNetworkStats'); | 196 this.send('getSessionNetworkStats'); |
| 197 }, | 197 }, |
| 198 | 198 |
| 199 sendGetHistoricNetworkStats: function() { | 199 sendGetHistoricNetworkStats: function() { |
| 200 this.send('getHistoricNetworkStats'); | 200 this.send('getHistoricNetworkStats'); |
| 201 }, | 201 }, |
| 202 | 202 |
| 203 sendStartNetLog: function() { |
| 204 this.send('startNetLog'); |
| 205 }, |
| 206 |
| 207 sendStopNetLog: function() { |
| 208 this.send('stopNetLog'); |
| 209 }, |
| 210 |
| 211 sendSendNetLog: function() { |
| 212 this.send('sendNetLog'); |
| 213 }, |
| 214 |
| 203 sendCloseIdleSockets: function() { | 215 sendCloseIdleSockets: function() { |
| 204 this.send('closeIdleSockets'); | 216 this.send('closeIdleSockets'); |
| 205 }, | 217 }, |
| 206 | 218 |
| 207 sendFlushSocketPools: function() { | 219 sendFlushSocketPools: function() { |
| 208 this.send('flushSocketPools'); | 220 this.send('flushSocketPools'); |
| 209 }, | 221 }, |
| 210 | 222 |
| 211 sendGetSpdySessionInfo: function() { | 223 sendGetSpdySessionInfo: function() { |
| 212 this.send('getSpdySessionInfo'); | 224 this.send('getSpdySessionInfo'); |
| (...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 782 helper.removeObserver(this); | 794 helper.removeObserver(this); |
| 783 --this.observingCount_; | 795 --this.observingCount_; |
| 784 this.updatedData_[name] = data; | 796 this.updatedData_[name] = data; |
| 785 if (this.observingCount_ == 0) | 797 if (this.observingCount_ == 0) |
| 786 this.callback_(this.updatedData_); | 798 this.callback_(this.updatedData_); |
| 787 } | 799 } |
| 788 }; | 800 }; |
| 789 | 801 |
| 790 return BrowserBridge; | 802 return BrowserBridge; |
| 791 })(); | 803 })(); |
| OLD | NEW |