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 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
363 [prefKey, details, callback], | 363 [prefKey, details, callback], |
364 extendSchema(setSchema)); | 364 extendSchema(setSchema)); |
365 }; | 365 }; |
366 this.clear = function(details, callback) { | 366 this.clear = function(details, callback) { |
367 var clearSchema = this.parameters.clear; | 367 var clearSchema = this.parameters.clear; |
368 chromeHidden.validate([details, callback], clearSchema); | 368 chromeHidden.validate([details, callback], clearSchema); |
369 return sendRequest('experimental.preferences.clear', | 369 return sendRequest('experimental.preferences.clear', |
370 [prefKey, details, callback], | 370 [prefKey, details, callback], |
371 extendSchema(clearSchema)); | 371 extendSchema(clearSchema)); |
372 }; | 372 }; |
373 this.onChange = new chrome.Event('experimental.preferences.' + prefKey | 373 this.onChange = new chrome.Event('experimental.preferences.' |
374 + '.onChange'); | 374 + prefKey + '.onChange'); |
375 }; | 375 }; |
376 customBindings['Preference'].prototype = new CustomBindingsObject(); | 376 customBindings['Preference'].prototype = new CustomBindingsObject(); |
377 } | 377 } |
378 | 378 |
379 // Page action events send (pageActionId, {tabId, tabUrl}). | 379 // Page action events send (pageActionId, {tabId, tabUrl}). |
380 function setupPageActionEvents(extensionId) { | 380 function setupPageActionEvents(extensionId) { |
381 var pageActions = GetCurrentPageActions(extensionId); | 381 var pageActions = GetCurrentPageActions(extensionId); |
382 | 382 |
383 var oldStyleEventName = "pageActions"; | 383 var oldStyleEventName = "pageActions"; |
384 // TODO(EXTENSIONS_DEPRECATED): only one page action | 384 // TODO(EXTENSIONS_DEPRECATED): only one page action |
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
907 | 907 |
908 if (!chrome.experimental) | 908 if (!chrome.experimental) |
909 chrome.experimental = {}; | 909 chrome.experimental = {}; |
910 | 910 |
911 if (!chrome.experimental.accessibility) | 911 if (!chrome.experimental.accessibility) |
912 chrome.experimental.accessibility = {}; | 912 chrome.experimental.accessibility = {}; |
913 | 913 |
914 if (!chrome.experimental.tts) | 914 if (!chrome.experimental.tts) |
915 chrome.experimental.tts = {}; | 915 chrome.experimental.tts = {}; |
916 })(); | 916 })(); |
OLD | NEW |