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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/main/Main.js

Issue 2149833002: DevTools: Add sendOverProtocol() method for protocol debugging (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: callback Created 4 years, 5 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/sdk/InspectorBackend.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com). 3 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com).
4 * Copyright (C) 2009 Joseph Pecoraro 4 * Copyright (C) 2009 Joseph Pecoraro
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 9 *
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 956 matching lines...) Expand 10 before | Expand all | Expand 10 after
967 * @param {!WebInspector.Event} event 967 * @param {!WebInspector.Event} event
968 */ 968 */
969 _inspectNode: function(event) 969 _inspectNode: function(event)
970 { 970 {
971 var deferredNode = /** @type {!WebInspector.DeferredDOMNode} */ (event.d ata); 971 var deferredNode = /** @type {!WebInspector.DeferredDOMNode} */ (event.d ata);
972 WebInspector.Revealer.reveal(deferredNode); 972 WebInspector.Revealer.reveal(deferredNode);
973 } 973 }
974 } 974 }
975 975
976 /** 976 /**
977 * @param {string} method
978 * @param {?Object} params
979 * @return {!Promise}
980 */
981 WebInspector.sendOverProtocol = function(method, params)
982 {
983 var connection = WebInspector.targetManager.mainTarget().connection();
984 return new Promise((resolve, reject) => {
985 connection.sendRawMessageForTesting(method, params, (err, result) => {
986 if (err)
987 return reject(err);
988 return resolve(result);
989 });
990 });
991 }
992
993 /**
977 * @constructor 994 * @constructor
978 * @extends {WebInspector.VBox} 995 * @extends {WebInspector.VBox}
979 * @param {string} reason 996 * @param {string} reason
980 */ 997 */
981 WebInspector.RemoteDebuggingTerminatedScreen = function(reason) 998 WebInspector.RemoteDebuggingTerminatedScreen = function(reason)
982 { 999 {
983 WebInspector.VBox.call(this, true); 1000 WebInspector.VBox.call(this, true);
984 this.registerRequiredCSS("main/remoteDebuggingTerminatedScreen.css"); 1001 this.registerRequiredCSS("main/remoteDebuggingTerminatedScreen.css");
985 var message = this.contentElement.createChild("div", "message"); 1002 var message = this.contentElement.createChild("div", "message");
986 message.createChild("span").textContent = WebInspector.UIString("Debugging c onnection was closed. Reason: "); 1003 message.createChild("span").textContent = WebInspector.UIString("Debugging c onnection was closed. Reason: ");
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
1117 * @return {?Element} 1134 * @return {?Element}
1118 */ 1135 */
1119 settingElement: function() 1136 settingElement: function()
1120 { 1137 {
1121 return WebInspector.SettingsUI.createSettingCheckbox(WebInspector.UIStri ng("Show rulers"), WebInspector.moduleSetting("showMetricsRulers")); 1138 return WebInspector.SettingsUI.createSettingCheckbox(WebInspector.UIStri ng("Show rulers"), WebInspector.moduleSetting("showMetricsRulers"));
1122 } 1139 }
1123 } 1140 }
1124 1141
1125 1142
1126 new WebInspector.Main(); 1143 new WebInspector.Main();
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/sdk/InspectorBackend.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698