OLD | NEW |
1 var chromium; | 1 var chromium; |
2 (function() { | 2 (function() { |
3 if (!chromium) | 3 if (!chromium) |
4 chromium = {}; | 4 chromium = {}; |
5 | 5 |
6 // callback handling | 6 // callback handling |
7 var callbacks = []; | 7 var callbacks = []; |
8 chromium._dispatchCallback = function(callbackId, str) { | 8 chromium._dispatchCallback = function(callbackId, str) { |
9 // We shouldn't be receiving evil JSON unless the browser is owned, but just | 9 // We shouldn't be receiving evil JSON unless the browser is owned, but just |
10 // to be safe, we sanitize it. This regex mania was borrowed from json2, | 10 // to be safe, we sanitize it. This regex mania was borrowed from json2, |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 // TODO(aa): This should eventually take an optional windowId param. | 67 // TODO(aa): This should eventually take an optional windowId param. |
68 chromium.tabs.getTabsForWindow = function(callback) { | 68 chromium.tabs.getTabsForWindow = function(callback) { |
69 native function GetTabsForWindow(); | 69 native function GetTabsForWindow(); |
70 sendRequest(GetTabsForWindow, null, callback); | 70 sendRequest(GetTabsForWindow, null, callback); |
71 }; | 71 }; |
72 chromium.tabs.createTab = function(tab, callback) { | 72 chromium.tabs.createTab = function(tab, callback) { |
73 native function CreateTab(); | 73 native function CreateTab(); |
74 sendRequest(CreateTab, tab, callback); | 74 sendRequest(CreateTab, tab, callback); |
75 }; | 75 }; |
76 })(); | 76 })(); |
OLD | NEW |