OLD | NEW |
1 // Copyright (c) 2009 The chrome Authors. All rights reserved. | 1 // Copyright (c) 2009 The chrome 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 // NOTE: If you change this file you need to touch renderer_resources.grd to | 6 // NOTE: If you change this file you need to touch renderer_resources.grd to |
7 // have your change take effect. | 7 // have your change take effect. |
8 // ----------------------------------------------------------------------------- | 8 // ----------------------------------------------------------------------------- |
9 | 9 |
10 var chrome; | 10 var chrome; |
11 (function() { | 11 (function() { |
12 native function GetNextRequestId(); | 12 native function GetNextRequestId(); |
13 native function GetWindow(); | 13 native function GetWindow(); |
14 native function GetCurrentWindow(); | 14 native function GetCurrentWindow(); |
15 native function GetLastFocusedWindow(); | 15 native function GetLastFocusedWindow(); |
16 native function CreateWindow(); | 16 native function CreateWindow(); |
| 17 native function UpdateWindow(); |
17 native function RemoveWindow(); | 18 native function RemoveWindow(); |
18 native function GetAllWindows(); | 19 native function GetAllWindows(); |
19 native function GetTab(); | 20 native function GetTab(); |
20 native function GetSelectedTab(); | 21 native function GetSelectedTab(); |
21 native function GetAllTabsInWindow(); | 22 native function GetAllTabsInWindow(); |
22 native function CreateTab(); | 23 native function CreateTab(); |
23 native function UpdateTab(); | 24 native function UpdateTab(); |
24 native function MoveTab(); | 25 native function MoveTab(); |
25 native function RemoveTab(); | 26 native function RemoveTab(); |
26 native function EnablePageAction(); | 27 native function EnablePageAction(); |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 url: chrome.types.optStr, | 159 url: chrome.types.optStr, |
159 left: chrome.types.optInt, | 160 left: chrome.types.optInt, |
160 top: chrome.types.optInt, | 161 top: chrome.types.optInt, |
161 width: chrome.types.optPInt, | 162 width: chrome.types.optPInt, |
162 height: chrome.types.optPInt | 163 height: chrome.types.optPInt |
163 }, | 164 }, |
164 optional: true | 165 optional: true |
165 }, | 166 }, |
166 chrome.types.optFun | 167 chrome.types.optFun |
167 ]; | 168 ]; |
168 | 169 |
| 170 chrome.windows.update = function(windowId, updateData, callback) { |
| 171 validate(arguments, arguments.callee.params); |
| 172 sendRequest(UpdateWindow, [windowId, updateData], callback); |
| 173 }; |
| 174 chrome.windows.update.params = [ |
| 175 chrome.types.pInt, |
| 176 { |
| 177 type: "object", |
| 178 properties: { |
| 179 left: chrome.types.optInt, |
| 180 top: chrome.types.optInt, |
| 181 width: chrome.types.optPInt, |
| 182 height: chrome.types.optPInt |
| 183 }, |
| 184 }, |
| 185 chrome.types.optFun |
| 186 ]; |
| 187 |
169 chrome.windows.remove = function(windowId, callback) { | 188 chrome.windows.remove = function(windowId, callback) { |
170 validate(arguments, arguments.callee.params); | 189 validate(arguments, arguments.callee.params); |
171 sendRequest(RemoveWindow, windowId, callback); | 190 sendRequest(RemoveWindow, windowId, callback); |
172 }; | 191 }; |
173 | 192 |
174 chrome.windows.remove.params = [ | 193 chrome.windows.remove.params = [ |
175 chrome.types.pInt, | 194 chrome.types.pInt, |
176 chrome.types.optFun | 195 chrome.types.optFun |
177 ]; | 196 ]; |
178 | 197 |
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
474 new chrome.Event("bookmark-children-reordered"); | 493 new chrome.Event("bookmark-children-reordered"); |
475 | 494 |
476 | 495 |
477 //---------------------------------------------------------------------------- | 496 //---------------------------------------------------------------------------- |
478 | 497 |
479 // Self. | 498 // Self. |
480 chrome.self = {}; | 499 chrome.self = {}; |
481 chrome.self.onConnect = new chrome.Event("channel-connect"); | 500 chrome.self.onConnect = new chrome.Event("channel-connect"); |
482 })(); | 501 })(); |
483 | 502 |
OLD | NEW |