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

Side by Side Diff: Source/WebCore/inspector/front-end/TimelinePanel.js

Issue 9965056: Merge 112539 - Web Inspector: "go to the previous panel" shortcut is painful to maintain (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1084/
Patch Set: Created 8 years, 8 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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 { 261 {
262 var shortcut = WebInspector.KeyboardShortcut; 262 var shortcut = WebInspector.KeyboardShortcut;
263 var modifiers = shortcut.Modifiers; 263 var modifiers = shortcut.Modifiers;
264 var section = WebInspector.shortcutsScreen.section(WebInspector.UIString ("Timeline Panel")); 264 var section = WebInspector.shortcutsScreen.section(WebInspector.UIString ("Timeline Panel"));
265 265
266 this._shortcuts[shortcut.makeKey("e", modifiers.CtrlOrMeta)] = this._tog gleTimelineButtonClicked.bind(this); 266 this._shortcuts[shortcut.makeKey("e", modifiers.CtrlOrMeta)] = this._tog gleTimelineButtonClicked.bind(this);
267 section.addKey(shortcut.shortcutToString("e", modifiers.CtrlOrMeta), Web Inspector.UIString("Start/stop recording")); 267 section.addKey(shortcut.shortcutToString("e", modifiers.CtrlOrMeta), Web Inspector.UIString("Start/stop recording"));
268 268
269 if (InspectorFrontendHost.canSaveAs()) { 269 if (InspectorFrontendHost.canSaveAs()) {
270 this._shortcuts[shortcut.makeKey("s", modifiers.CtrlOrMeta)] = this. _saveToFile.bind(this); 270 this._shortcuts[shortcut.makeKey("s", modifiers.CtrlOrMeta)] = this. _saveToFile.bind(this);
271 section.addKey(shortcut.shortcutToString("s", modifiers.CtrlOrMeta), WebInspector.UIString("Save Timeline data\u2026")); 271 section.addKey(shortcut.shortcutToString("s", modifiers.CtrlOrMeta), WebInspector.UIString("Save timeline data"));
272 } 272 }
273 273
274 this._shortcuts[shortcut.makeKey("o", modifiers.CtrlOrMeta)] = this._fil eSelectorElement.click.bind(this._fileSelectorElement); 274 this._shortcuts[shortcut.makeKey("o", modifiers.CtrlOrMeta)] = this._fil eSelectorElement.click.bind(this._fileSelectorElement);
275 section.addKey(shortcut.shortcutToString("o", modifiers.CtrlOrMeta), Web Inspector.UIString("Load Timeline data\u2026")); 275 section.addKey(shortcut.shortcutToString("o", modifiers.CtrlOrMeta), Web Inspector.UIString("Load timeline data"));
276 }, 276 },
277 277
278 _createFileSelector: function() 278 _createFileSelector: function()
279 { 279 {
280 if (this._fileSelectorElement) 280 if (this._fileSelectorElement)
281 this.element.removeChild(this._fileSelectorElement); 281 this.element.removeChild(this._fileSelectorElement);
282 282
283 var fileSelectorElement = document.createElement("input"); 283 var fileSelectorElement = document.createElement("input");
284 fileSelectorElement.type = "file"; 284 fileSelectorElement.type = "file";
285 fileSelectorElement.style.zIndex = -1; 285 fileSelectorElement.style.zIndex = -1;
286 fileSelectorElement.style.position = "absolute"; 286 fileSelectorElement.style.position = "absolute";
287 fileSelectorElement.onchange = this._loadFromFile.bind(this); 287 fileSelectorElement.onchange = this._loadFromFile.bind(this);
288 this.element.appendChild(fileSelectorElement); 288 this.element.appendChild(fileSelectorElement);
289 this._fileSelectorElement = fileSelectorElement; 289 this._fileSelectorElement = fileSelectorElement;
290 }, 290 },
291 291
292 _contextMenu: function(event) 292 _contextMenu: function(event)
293 { 293 {
294 var contextMenu = new WebInspector.ContextMenu(); 294 var contextMenu = new WebInspector.ContextMenu();
295 if (InspectorFrontendHost.canSaveAs()) 295 if (InspectorFrontendHost.canSaveAs())
296 contextMenu.appendItem(WebInspector.UIString("&Save Timeline data\u2 026"), this._saveToFile.bind(this)); 296 contextMenu.appendItem(WebInspector.UIString("Save Timeline data\u20 26"), this._saveToFile.bind(this));
297 contextMenu.appendItem(WebInspector.UIString("L&oad Timeline data\u2026" ), this._fileSelectorElement.click.bind(this._fileSelectorElement)); 297 contextMenu.appendItem(WebInspector.UIString("Load Timeline data\u2026") , this._fileSelectorElement.click.bind(this._fileSelectorElement));
298 contextMenu.show(event); 298 contextMenu.show(event);
299 }, 299 },
300 300
301 _saveToFile: function() 301 _saveToFile: function()
302 { 302 {
303 this._model.saveToFile(); 303 this._model.saveToFile();
304 }, 304 },
305 305
306 _loadFromFile: function() 306 _loadFromFile: function()
307 { 307 {
(...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after
1008 1008
1009 WebInspector.TimelineIsLongFilter.prototype = { 1009 WebInspector.TimelineIsLongFilter.prototype = {
1010 /** 1010 /**
1011 * @param {WebInspector.TimelinePresentationModel.Record} record 1011 * @param {WebInspector.TimelinePresentationModel.Record} record
1012 */ 1012 */
1013 accept: function(record) 1013 accept: function(record)
1014 { 1014 {
1015 return this._panel._showShortEvents || record.isLong(); 1015 return this._panel._showShortEvents || record.isLong();
1016 } 1016 }
1017 } 1017 }
OLDNEW
« no previous file with comments | « Source/WebCore/inspector/front-end/ScriptsPanel.js ('k') | Source/WebCore/inspector/front-end/inspector.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698