| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 // 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 chromium; | 10 var chromium; |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 | 182 |
| 183 chromium.tabs.removeTab = function(tabId) { | 183 chromium.tabs.removeTab = function(tabId) { |
| 184 validate(arguments, arguments.callee.params); | 184 validate(arguments, arguments.callee.params); |
| 185 sendRequest(RemoveTab, tabId); | 185 sendRequest(RemoveTab, tabId); |
| 186 }; | 186 }; |
| 187 | 187 |
| 188 chromium.tabs.removeTab.params = [ | 188 chromium.tabs.removeTab.params = [ |
| 189 chromium.types.pInt | 189 chromium.types.pInt |
| 190 ]; | 190 ]; |
| 191 | 191 |
| 192 // onTabMoved sends ({tabId, windowId, fromIndex, toIndex}) as named | 192 // sends ({tabId, windowId, index}). |
| 193 // arguments. | 193 // will *NOT* be followed by tab-attached - it is implied. |
| 194 // *MAY* be followed by tab-selection-changed. |
| 195 chromium.tabs.onTabCreated = new chromium.Event("tab-created"); |
| 196 |
| 197 // sends ({tabId, windowId, fromIndex, toIndex}). |
| 198 // tabs can only "move" within a window. |
| 194 chromium.tabs.onTabMoved = new chromium.Event("tab-moved"); | 199 chromium.tabs.onTabMoved = new chromium.Event("tab-moved"); |
| 200 |
| 201 // sends ({tabId, windowId, index}). |
| 202 chromium.tabs.onTabSelectionChanged = |
| 203 new chromium.Event("tab-selection-changed"); |
| 204 |
| 205 // sends ({tabId, windowId, index}). |
| 206 // *MAY* be followed by tab-selection-changed. |
| 207 chromium.tabs.onTabAttached = new chromium.Event("tab-attached"); |
| 208 |
| 209 // sends ({tabId, windowId, index}). |
| 210 // *WILL* be followed by tab-selection-changed. |
| 211 chromium.tabs.onTabDetached = new chromium.Event("tab-detached"); |
| 212 |
| 213 // sends (tabId). |
| 214 // *WILL* be followed by tab-selection-changed. |
| 215 // will *NOT* be followed or preceded by tab-detached. |
| 216 chromium.tabs.onTabRemoved = new chromium.Event("tab-removed"); |
| 195 | 217 |
| 196 //---------------------------------------------------------------------------- | 218 //---------------------------------------------------------------------------- |
| 197 | 219 |
| 198 // Bookmarks | 220 // Bookmarks |
| 199 // TODO(erikkay): Call validate() in these functions. | 221 // TODO(erikkay): Call validate() in these functions. |
| 200 chromium.bookmarks = {}; | 222 chromium.bookmarks = {}; |
| 201 | 223 |
| 202 chromium.bookmarks.get = function(ids, callback) { | 224 chromium.bookmarks.get = function(ids, callback) { |
| 203 sendRequest(GetBookmarks, ids, callback); | 225 sendRequest(GetBookmarks, ids, callback); |
| 204 }; | 226 }; |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 chromium.types.optFun | 309 chromium.types.optFun |
| 288 ]; | 310 ]; |
| 289 | 311 |
| 290 //---------------------------------------------------------------------------- | 312 //---------------------------------------------------------------------------- |
| 291 | 313 |
| 292 // Self | 314 // Self |
| 293 chromium.self = {}; | 315 chromium.self = {}; |
| 294 chromium.self.onConnect = new chromium.Event("channel-connect"); | 316 chromium.self.onConnect = new chromium.Event("channel-connect"); |
| 295 })(); | 317 })(); |
| 296 | 318 |
| OLD | NEW |