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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/extensions/ExtensionServer.js

Issue 1808533002: DevTools: wrap console evaluation with user gesture indicator for convenience. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 966 matching lines...) Expand 10 before | Expand all | Expand 10 after
977 if (!context) 977 if (!context)
978 return this._status.E_FAILED(frame.url + " has no execution context"); 978 return this._status.E_FAILED(frame.url + " has no execution context");
979 } 979 }
980 980
981 contextId = context.id; 981 contextId = context.id;
982 } 982 }
983 var target = target ? target : WebInspector.targetManager.mainTarget(); 983 var target = target ? target : WebInspector.targetManager.mainTarget();
984 if (!target) 984 if (!target)
985 return; 985 return;
986 986
987 target.runtimeAgent().evaluate(expression, "extension", exposeCommandLin eAPI, true, contextId, returnByValue, false, onEvalute); 987 target.runtimeAgent().evaluate(expression, "extension", exposeCommandLin eAPI, true, contextId, returnByValue, false, false, onEvalute);
988 988
989 /** 989 /**
990 * @param {?Protocol.Error} error 990 * @param {?Protocol.Error} error
991 * @param {!RuntimeAgent.RemoteObject} result 991 * @param {!RuntimeAgent.RemoteObject} result
992 * @param {boolean=} wasThrown 992 * @param {boolean=} wasThrown
993 */ 993 */
994 function onEvalute(error, result, wasThrown) 994 function onEvalute(error, result, wasThrown)
995 { 995 {
996 if (error) { 996 if (error) {
997 callback(error, null, wasThrown); 997 callback(error, null, wasThrown);
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
1081 /** 1081 /**
1082 * @typedef {{code: string, description: string, details: !Array.<*>}} 1082 * @typedef {{code: string, description: string, details: !Array.<*>}}
1083 */ 1083 */
1084 WebInspector.ExtensionStatus.Record; 1084 WebInspector.ExtensionStatus.Record;
1085 1085
1086 WebInspector.extensionAPI = {}; 1086 WebInspector.extensionAPI = {};
1087 defineCommonExtensionSymbols(WebInspector.extensionAPI); 1087 defineCommonExtensionSymbols(WebInspector.extensionAPI);
1088 1088
1089 /** @type {!WebInspector.ExtensionServer} */ 1089 /** @type {!WebInspector.ExtensionServer} */
1090 WebInspector.extensionServer; 1090 WebInspector.extensionServer;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698