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; |
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 validate(arguments, arguments.callee.params); | 351 validate(arguments, arguments.callee.params); |
352 sendRequest(EnablePageAction, [pageActionId, action]); | 352 sendRequest(EnablePageAction, [pageActionId, action]); |
353 } | 353 } |
354 | 354 |
355 chrome.pageActions.enableForTab.params = [ | 355 chrome.pageActions.enableForTab.params = [ |
356 chrome.types.str, | 356 chrome.types.str, |
357 { | 357 { |
358 type: "object", | 358 type: "object", |
359 properties: { | 359 properties: { |
360 tabId: chrome.types.pInt, | 360 tabId: chrome.types.pInt, |
361 url: chrome.types.str | 361 url: chrome.types.str, |
| 362 title: chrome.types.optStr, |
| 363 iconId: chrome.types.optPInt, |
362 }, | 364 }, |
363 optional: false | 365 optional: false |
364 } | 366 } |
365 ]; | 367 ]; |
366 | 368 |
367 chrome.pageActions.disableForTab = function(pageActionId, action) { | 369 chrome.pageActions.disableForTab = function(pageActionId, action) { |
368 validate(arguments, arguments.callee.params); | 370 validate(arguments, arguments.callee.params); |
369 sendRequest(DisablePageAction, [pageActionId, action]); | 371 sendRequest(DisablePageAction, [pageActionId, action]); |
370 } | 372 } |
371 | 373 |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
534 window.addEventListener('unload', function() { | 536 window.addEventListener('unload', function() { |
535 UnregisterExtension(extensionId); }, false); | 537 UnregisterExtension(extensionId); }, false); |
536 delete chrome.self.register_; | 538 delete chrome.self.register_; |
537 } | 539 } |
538 | 540 |
539 chrome.self.getViews = function() { | 541 chrome.self.getViews = function() { |
540 return GetViews(); | 542 return GetViews(); |
541 } | 543 } |
542 })(); | 544 })(); |
543 | 545 |
OLD | NEW |