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

Unified 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, 9 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 side-by-side diff with in-line comments
Download patch
Index: Source/devtools/front_end/InspectorView.js
diff --git a/Source/devtools/front_end/InspectorView.js b/Source/devtools/front_end/InspectorView.js
index f9abed168acb1d5dfae1fcb07ef3adcfd1b08c5f..f24ad734ec4d91aea5735f55cc0df5fcf54520e2 100644
--- a/Source/devtools/front_end/InspectorView.js
+++ b/Source/devtools/front_end/InspectorView.js
@@ -160,6 +160,14 @@ WebInspector.InspectorView.prototype = {
return this._currentPanel;
},
+ /**
+ * @return {?string}
+ */
+ currentPanelId: function()
pfeldman 2014/04/14 13:10:44 You should not need this?
apavlov 2014/04/15 13:33:14 Done.
+ {
+ return this._tabbedPane.selectedTabId;
+ },
+
showInitialPanel: function()
{
this._tabbedPane.addEventListener(WebInspector.TabbedPane.EventTypes.TabSelected, this._tabSelected, this);
@@ -196,6 +204,8 @@ WebInspector.InspectorView.prototype = {
_tabSelected: function()
{
var panelName = this._tabbedPane.selectedTabId;
+ if (!panelName)
+ return;
var panel = this._panelDescriptors[this._tabbedPane.selectedTabId].panel();
this._tabbedPane.changeTabView(panelName, panel);
@@ -259,7 +269,7 @@ WebInspector.InspectorView.prototype = {
},
/**
- * @return {string}
+ * @return {?string}
*/
selectedViewInDrawer: function()
{

Powered by Google App Engine
This is Rietveld 408576698