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

Side by Side Diff: Source/devtools/front_end/components/ShortcutsScreen.js

Issue 1113813002: [DevTools] Rename View to Widget. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebased Created 5 years, 7 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 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 */ 44 */
45 section: function(name) 45 section: function(name)
46 { 46 {
47 var section = this._sections[name]; 47 var section = this._sections[name];
48 if (!section) 48 if (!section)
49 this._sections[name] = section = new WebInspector.ShortcutsSection(n ame); 49 this._sections[name] = section = new WebInspector.ShortcutsSection(n ame);
50 return section; 50 return section;
51 }, 51 },
52 52
53 /** 53 /**
54 * @return {!WebInspector.View} 54 * @return {!WebInspector.Widget}
55 */ 55 */
56 createShortcutsTabView: function() 56 createShortcutsTabView: function()
57 { 57 {
58 var orderedSections = []; 58 var orderedSections = [];
59 for (var section in this._sections) 59 for (var section in this._sections)
60 orderedSections.push(this._sections[section]); 60 orderedSections.push(this._sections[section]);
61 function compareSections(a, b) 61 function compareSections(a, b)
62 { 62 {
63 return a.order - b.order; 63 return a.order - b.order;
64 } 64 }
65 orderedSections.sort(compareSections); 65 orderedSections.sort(compareSections);
66 66
67 var view = new WebInspector.View(); 67 var widget = new WebInspector.Widget();
68 68
69 view.element.className = "settings-tab-container"; // Override 69 widget.element.className = "settings-tab-container"; // Override
70 view.element.createChild("header").createChild("h3").createTextChild(Web Inspector.UIString("Shortcuts")); 70 widget.element.createChild("header").createChild("h3").createTextChild(W ebInspector.UIString("Shortcuts"));
71 var scrollPane = view.element.createChild("div", "help-container-wrapper "); 71 var scrollPane = widget.element.createChild("div", "help-container-wrapp er");
72 var container = scrollPane.createChild("div"); 72 var container = scrollPane.createChild("div");
73 container.className = "help-content help-container"; 73 container.className = "help-content help-container";
74 for (var i = 0; i < orderedSections.length; ++i) 74 for (var i = 0; i < orderedSections.length; ++i)
75 orderedSections[i].renderSection(container); 75 orderedSections[i].renderSection(container);
76 76
77 var note = scrollPane.createChild("p", "help-footnote"); 77 var note = scrollPane.createChild("p", "help-footnote");
78 note.appendChild(WebInspector.linkifyDocumentationURLAsNode("shortcuts", WebInspector.UIString("Full list of keyboard shortcuts and gestures"))); 78 note.appendChild(WebInspector.linkifyDocumentationURLAsNode("shortcuts", WebInspector.UIString("Full list of keyboard shortcuts and gestures")));
79 79
80 return view; 80 return widget;
81 } 81 }
82 } 82 }
83 83
84 /** 84 /**
85 * We cannot initialize it here as localized strings are not loaded yet. 85 * We cannot initialize it here as localized strings are not loaded yet.
86 * @type {!WebInspector.ShortcutsScreen} 86 * @type {!WebInspector.ShortcutsScreen}
87 */ 87 */
88 WebInspector.shortcutsScreen; 88 WebInspector.shortcutsScreen;
89 89
90 /** 90 /**
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 Left: [ 528 Left: [
529 WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortc ut.Keys.Left), 529 WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortc ut.Keys.Left),
530 WebInspector.KeyboardShortcut.makeDescriptor("a") 530 WebInspector.KeyboardShortcut.makeDescriptor("a")
531 ], 531 ],
532 532
533 Right: [ 533 Right: [
534 WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortc ut.Keys.Right), 534 WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortc ut.Keys.Right),
535 WebInspector.KeyboardShortcut.makeDescriptor("d") 535 WebInspector.KeyboardShortcut.makeDescriptor("d")
536 ] 536 ]
537 } 537 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698