Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(105)

Side by Side Diff: chrome/renderer/resources/extension_process_bindings.js

Issue 7720002: Chrome Extensions chrome.experimental.offscreenTabs.* API implementation, docs, and test. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 1002 matching lines...) Expand 10 before | Expand all | Expand 10 after
1013 // the rest of the API. See crbug/29215 . 1013 // the rest of the API. See crbug/29215 .
1014 if (arguments.length == 2 && typeof(arguments[1]) == "function") { 1014 if (arguments.length == 2 && typeof(arguments[1]) == "function") {
1015 // If the old signature is used, add a null details object. 1015 // If the old signature is used, add a null details object.
1016 newArgs = [arguments[0], null, arguments[1]]; 1016 newArgs = [arguments[0], null, arguments[1]];
1017 } else { 1017 } else {
1018 newArgs = arguments; 1018 newArgs = arguments;
1019 } 1019 }
1020 return newArgs; 1020 return newArgs;
1021 }; 1021 };
1022 1022
1023 apiFunctions["experimental.offscreenTabs.sendKeyboardEvent"].
1024 updateArgumentsPreValidate = function() {
1025 // Delete properties that are objects in order to be able to serialize.
1026 var arg1 = arguments[1];
1027
1028 for (prop in arg1)
jstritar 2011/09/16 16:03:50 nit: not required but might be easier to read to u
alexbost 2011/09/16 20:18:14 Done.
1029 if (typeof arg1[prop] == "object")
1030 delete arg1[prop];
1031
1032 return arguments;
1033 };
1034
1035 apiFunctions["experimental.offscreenTabs.sendMouseEvent"].
1036 updateArgumentsPreValidate =
1037 apiFunctions["experimental.offscreenTabs.sendKeyboardEvent"].
1038 updateArgumentsPreValidate;
jstritar 2011/09/16 16:03:50 apiFunctions["experimental.offscreenTabs.sendMouse
alexbost 2011/09/16 20:18:14 Done.
1039
1023 apiFunctions["omnibox.sendSuggestions"].updateArgumentsPostValidate = 1040 apiFunctions["omnibox.sendSuggestions"].updateArgumentsPostValidate =
1024 function(requestId, userSuggestions) { 1041 function(requestId, userSuggestions) {
1025 var suggestions = []; 1042 var suggestions = [];
1026 for (var i = 0; i < userSuggestions.length; i++) { 1043 for (var i = 0; i < userSuggestions.length; i++) {
1027 var parseResult = parseOmniboxDescription( 1044 var parseResult = parseOmniboxDescription(
1028 userSuggestions[i].description); 1045 userSuggestions[i].description);
1029 parseResult.content = userSuggestions[i].content; 1046 parseResult.content = userSuggestions[i].content;
1030 suggestions.push(parseResult); 1047 suggestions.push(parseResult);
1031 } 1048 }
1032 return [requestId, suggestions]; 1049 return [requestId, suggestions];
(...skipping 30 matching lines...) Expand all
1063 1080
1064 if (!chrome.tts) 1081 if (!chrome.tts)
1065 chrome.tts = {}; 1082 chrome.tts = {};
1066 1083
1067 if (!chrome.ttsEngine) 1084 if (!chrome.ttsEngine)
1068 chrome.ttsEngine = {}; 1085 chrome.ttsEngine = {};
1069 1086
1070 if (!chrome.experimental.downloads) 1087 if (!chrome.experimental.downloads)
1071 chrome.experimental.downloads = {}; 1088 chrome.experimental.downloads = {};
1072 })(); 1089 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698