| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 // Scripts for the message handler. | 5 // Scripts for the message handler. |
| 6 | 6 |
| 7 goog.provide('__crweb.message'); |
| 8 |
| 7 /** | 9 /** |
| 8 * Namespace for this module. | 10 * Namespace for this module. |
| 9 */ | 11 */ |
| 10 __gCrWeb.message = {}; | 12 __gCrWeb.message = {}; |
| 11 | 13 |
| 12 /* Beginning of anonymous object. */ | 14 /* Beginning of anonymous object. */ |
| 13 new function() { | 15 new function() { |
| 14 /** | 16 /** |
| 15 * Object to manage queue of messages waiting to be sent to the main | 17 * Object to manage queue of messages waiting to be sent to the main |
| 16 * application for immediate processing. | 18 * application for immediate processing. |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 delete Object.prototype.toJSON; | 105 delete Object.prototype.toJSON; |
| 104 __gCrWeb.message_dynamic.sendQueue(queueObject); | 106 __gCrWeb.message_dynamic.sendQueue(queueObject); |
| 105 | 107 |
| 106 if (originalObjectToJSON) { | 108 if (originalObjectToJSON) { |
| 107 // Restore Object.prototype.toJSON to prevent from breaking any | 109 // Restore Object.prototype.toJSON to prevent from breaking any |
| 108 // functionality on the page that depends on its custom implementation. | 110 // functionality on the page that depends on its custom implementation. |
| 109 Object.prototype.toJSON = originalObjectToJSON; | 111 Object.prototype.toJSON = originalObjectToJSON; |
| 110 } | 112 } |
| 111 }; | 113 }; |
| 112 } | 114 } |
| OLD | NEW |