| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 var chrome = chrome || {}; | 5 var chrome = chrome || {}; |
| 6 (function () { | 6 (function () { |
| 7 native function GetChromeHidden(); | 7 native function GetChromeHidden(); |
| 8 native function AttachEvent(eventName); | 8 native function AttachEvent(eventName); |
| 9 native function DetachEvent(eventName); | 9 native function DetachEvent(eventName); |
| 10 native function GetExternalFileEntry(fileDefinition); | 10 native function GetExternalFileEntry(fileDefinition); |
| 11 native function Print(); |
| 11 | 12 |
| 12 var chromeHidden = GetChromeHidden(); | 13 var chromeHidden = GetChromeHidden(); |
| 13 | 14 |
| 14 // Local implementation of JSON.parse & JSON.stringify that protect us | 15 // Local implementation of JSON.parse & JSON.stringify that protect us |
| 15 // from being clobbered by an extension. | 16 // from being clobbered by an extension. |
| 16 chromeHidden.JSON = new (function() { | 17 chromeHidden.JSON = new (function() { |
| 17 var $Object = Object; | 18 var $Object = Object; |
| 18 var $Array = Array; | 19 var $Array = Array; |
| 19 var $jsonStringify = JSON.stringify; | 20 var $jsonStringify = JSON.stringify; |
| 20 var $jsonParse = JSON.parse; | 21 var $jsonParse = JSON.parse; |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 var event = allAttachedEvents[i]; | 242 var event = allAttachedEvents[i]; |
| 242 if (event) | 243 if (event) |
| 243 event.detach_(); | 244 event.detach_(); |
| 244 } | 245 } |
| 245 }; | 246 }; |
| 246 | 247 |
| 247 chromeHidden.dispatchError = function(msg) { | 248 chromeHidden.dispatchError = function(msg) { |
| 248 console.error(msg); | 249 console.error(msg); |
| 249 }; | 250 }; |
| 250 })(); | 251 })(); |
| OLD | NEW |