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

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

Issue 2600323002: DevTools: extract protocol module (Closed)
Patch Set: move inspector backend commands.js Created 3 years, 11 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) 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 826 matching lines...) Expand 10 before | Expand all | Expand 10 after
837 } 837 }
838 }; 838 };
839 839
840 /** 840 /**
841 * @param {string} method 841 * @param {string} method
842 * @param {?Object} params 842 * @param {?Object} params
843 * @return {!Promise} 843 * @return {!Promise}
844 */ 844 */
845 Main.sendOverProtocol = function(method, params) { 845 Main.sendOverProtocol = function(method, params) {
846 return new Promise((resolve, reject) => { 846 return new Promise((resolve, reject) => {
847 InspectorBackendClass.sendRawMessageForTesting(method, params, (err, result) => { 847 Protocol.InspectorBackend.sendRawMessageForTesting(method, params, (err, res ult) => {
848 if (err) 848 if (err)
849 return reject(err); 849 return reject(err);
850 return resolve(result); 850 return resolve(result);
851 }); 851 });
852 }); 852 });
853 }; 853 };
854 854
855 /** 855 /**
856 * @unrestricted 856 * @unrestricted
857 */ 857 */
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
981 * @override 981 * @override
982 * @return {?Element} 982 * @return {?Element}
983 */ 983 */
984 settingElement() { 984 settingElement() {
985 return UI.SettingsUI.createSettingCheckbox( 985 return UI.SettingsUI.createSettingCheckbox(
986 Common.UIString('Show rulers'), Common.moduleSetting('showMetricsRulers' )); 986 Common.UIString('Show rulers'), Common.moduleSetting('showMetricsRulers' ));
987 } 987 }
988 }; 988 };
989 989
990 new Main.Main(); 990 new Main.Main();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698