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

Side by Side Diff: Source/devtools/front_end/InspectorView.js

Issue 218613013: DevTools: Decouple shortcuts from actions, introduce shortcut contexts (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix context-related sort order Created 6 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 | Annotate | Revision Log
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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 }, 153 },
154 154
155 /** 155 /**
156 * @return {!WebInspector.Panel} 156 * @return {!WebInspector.Panel}
157 */ 157 */
158 currentPanel: function() 158 currentPanel: function()
159 { 159 {
160 return this._currentPanel; 160 return this._currentPanel;
161 }, 161 },
162 162
163 /**
164 * @return {?string}
165 */
166 currentPanelId: function()
pfeldman 2014/04/14 13:10:44 You should not need this?
apavlov 2014/04/15 13:33:14 Done.
167 {
168 return this._tabbedPane.selectedTabId;
169 },
170
163 showInitialPanel: function() 171 showInitialPanel: function()
164 { 172 {
165 this._tabbedPane.addEventListener(WebInspector.TabbedPane.EventTypes.Tab Selected, this._tabSelected, this); 173 this._tabbedPane.addEventListener(WebInspector.TabbedPane.EventTypes.Tab Selected, this._tabSelected, this);
166 this._tabSelected(); 174 this._tabSelected();
167 this._drawer.initialPanelShown(); 175 this._drawer.initialPanelShown();
168 }, 176 },
169 177
170 showDrawerEditor: function() 178 showDrawerEditor: function()
171 { 179 {
172 this._drawer.showDrawerEditor(); 180 this._drawer.showDrawerEditor();
(...skipping 16 matching lines...) Expand all
189 * @param {boolean} available 197 * @param {boolean} available
190 */ 198 */
191 setDrawerEditorAvailable: function(available) 199 setDrawerEditorAvailable: function(available)
192 { 200 {
193 this._drawer.setDrawerEditorAvailable(available); 201 this._drawer.setDrawerEditorAvailable(available);
194 }, 202 },
195 203
196 _tabSelected: function() 204 _tabSelected: function()
197 { 205 {
198 var panelName = this._tabbedPane.selectedTabId; 206 var panelName = this._tabbedPane.selectedTabId;
207 if (!panelName)
208 return;
199 var panel = this._panelDescriptors[this._tabbedPane.selectedTabId].panel (); 209 var panel = this._panelDescriptors[this._tabbedPane.selectedTabId].panel ();
200 this._tabbedPane.changeTabView(panelName, panel); 210 this._tabbedPane.changeTabView(panelName, panel);
201 211
202 this._currentPanel = panel; 212 this._currentPanel = panel;
203 this._lastActivePanelSetting.set(panel.name); 213 this._lastActivePanelSetting.set(panel.name);
204 this._pushToHistory(panel.name); 214 this._pushToHistory(panel.name);
205 WebInspector.userMetrics.panelShown(panel.name); 215 WebInspector.userMetrics.panelShown(panel.name);
206 panel.focus(); 216 panel.focus();
207 }, 217 },
208 218
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 /** 262 /**
253 * @param {string} id 263 * @param {string} id
254 * @param {boolean=} immediate 264 * @param {boolean=} immediate
255 */ 265 */
256 showViewInDrawer: function(id, immediate) 266 showViewInDrawer: function(id, immediate)
257 { 267 {
258 this._drawer.showView(id, immediate); 268 this._drawer.showView(id, immediate);
259 }, 269 },
260 270
261 /** 271 /**
262 * @return {string} 272 * @return {?string}
263 */ 273 */
264 selectedViewInDrawer: function() 274 selectedViewInDrawer: function()
265 { 275 {
266 return this._drawer.selectedViewId(); 276 return this._drawer.selectedViewId();
267 }, 277 },
268 278
269 closeDrawer: function() 279 closeDrawer: function()
270 { 280 {
271 this._drawer.closeDrawer(); 281 this._drawer.closeDrawer();
272 }, 282 },
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
506 window.addEventListener("scroll", this._onScrollBound, false); 516 window.addEventListener("scroll", this._onScrollBound, false);
507 else 517 else
508 window.removeEventListener("scroll", this._onScrollBound, false); 518 window.removeEventListener("scroll", this._onScrollBound, false);
509 519
510 WebInspector.VBox.prototype.doResize.call(this); 520 WebInspector.VBox.prototype.doResize.call(this);
511 this._onScroll(); 521 this._onScroll();
512 }, 522 },
513 523
514 __proto__: WebInspector.VBox.prototype 524 __proto__: WebInspector.VBox.prototype
515 }; 525 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698