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

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: Address comments - take 1 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 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..e66a0471f42de62652374307c11b7b0cf689b3cb 100644
--- a/Source/devtools/front_end/InspectorView.js
+++ b/Source/devtools/front_end/InspectorView.js
@@ -196,8 +196,11 @@ 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);
+ WebInspector.context.setFlavor(WebInspector.Panel, panel);
pfeldman 2014/04/17 10:40:25 Why would we put panel into the context - there al
apavlov 2014/04/17 12:42:22 Done.
this._currentPanel = panel;
this._lastActivePanelSetting.set(panel.name);
@@ -216,6 +219,7 @@ WebInspector.InspectorView.prototype = {
this._tabbedPane.changeTabView(x.name, x);
this._tabbedPane.selectTab(x.name);
+ WebInspector.context.setFlavor(WebInspector.Panel, x);
},
/**
@@ -259,7 +263,7 @@ WebInspector.InspectorView.prototype = {
},
/**
- * @return {string}
+ * @return {?string}
*/
selectedViewInDrawer: function()
{

Powered by Google App Engine
This is Rietveld 408576698