| 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 // This script contains privileged chrome extension related javascript APIs. | 5 // This script contains privileged chrome extension related javascript APIs. |
| 6 // It is loaded by pages whose URL has the chrome-extension protocol. | 6 // It is loaded by pages whose URL has the chrome-extension protocol. |
| 7 | 7 |
| 8 var chrome = chrome || {}; | 8 var chrome = chrome || {}; |
| 9 (function() { | 9 (function() { |
| 10 native function GetExtensionAPIDefinition(); | 10 native function GetExtensionAPIDefinition(); |
| (...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 398 [contentType, details, callback], | 398 [contentType, details, callback], |
| 399 extendSchema(setSchema)); | 399 extendSchema(setSchema)); |
| 400 }; | 400 }; |
| 401 this.clear = function(details, callback) { | 401 this.clear = function(details, callback) { |
| 402 var clearSchema = this.parameters.clear; | 402 var clearSchema = this.parameters.clear; |
| 403 chromeHidden.validate([details, callback], clearSchema); | 403 chromeHidden.validate([details, callback], clearSchema); |
| 404 return sendRequest('experimental.contentSettings.clear', | 404 return sendRequest('experimental.contentSettings.clear', |
| 405 [contentType, details, callback], | 405 [contentType, details, callback], |
| 406 extendSchema(clearSchema)); | 406 extendSchema(clearSchema)); |
| 407 }; | 407 }; |
| 408 this.getResourceIdentifiers = function(callback) { |
| 409 var schema = this.parameters.getResourceIdentifiers; |
| 410 chromeHidden.validate([callback], schema); |
| 411 return sendRequest( |
| 412 'experimental.contentSettings.getResourceIdentifiers', |
| 413 [contentType, callback], |
| 414 extendSchema(schema)); |
| 415 }; |
| 408 } | 416 } |
| 409 ContentSetting.prototype = new CustomBindingsObject(); | 417 ContentSetting.prototype = new CustomBindingsObject(); |
| 410 customBindings['ContentSetting'] = ContentSetting; | 418 customBindings['ContentSetting'] = ContentSetting; |
| 411 } | 419 } |
| 412 | 420 |
| 413 // Page action events send (pageActionId, {tabId, tabUrl}). | 421 // Page action events send (pageActionId, {tabId, tabUrl}). |
| 414 function setupPageActionEvents(extensionId) { | 422 function setupPageActionEvents(extensionId) { |
| 415 var pageActions = GetCurrentPageActions(extensionId); | 423 var pageActions = GetCurrentPageActions(extensionId); |
| 416 | 424 |
| 417 var oldStyleEventName = "pageActions"; | 425 var oldStyleEventName = "pageActions"; |
| (...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 993 | 1001 |
| 994 if (!chrome.experimental) | 1002 if (!chrome.experimental) |
| 995 chrome.experimental = {}; | 1003 chrome.experimental = {}; |
| 996 | 1004 |
| 997 if (!chrome.experimental.accessibility) | 1005 if (!chrome.experimental.accessibility) |
| 998 chrome.experimental.accessibility = {}; | 1006 chrome.experimental.accessibility = {}; |
| 999 | 1007 |
| 1000 if (!chrome.experimental.tts) | 1008 if (!chrome.experimental.tts) |
| 1001 chrome.experimental.tts = {}; | 1009 chrome.experimental.tts = {}; |
| 1002 })(); | 1010 })(); |
| OLD | NEW |