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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/layers/LayersPanel.js

Issue 2319523004: DevTools: Remember the last focused widget. (Closed)
Patch Set: Created 4 years, 3 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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 66
67 WebInspector.LayersPanel.DetailsViewTabs = { 67 WebInspector.LayersPanel.DetailsViewTabs = {
68 Details: "details", 68 Details: "details",
69 Profiler: "profiler" 69 Profiler: "profiler"
70 }; 70 };
71 71
72 WebInspector.LayersPanel.prototype = { 72 WebInspector.LayersPanel.prototype = {
73 focus: function() 73 focus: function()
74 { 74 {
75 this._layerTreeOutline.focus(); 75 this._layerTreeOutline.focus();
76 this.wasFocused();
76 }, 77 },
77 78
78 wasShown: function() 79 wasShown: function()
79 { 80 {
80 WebInspector.Panel.prototype.wasShown.call(this); 81 WebInspector.Panel.prototype.wasShown.call(this);
81 if (this._model) 82 if (this._model)
82 this._model.enable(); 83 this._model.enable();
83 this._layerTreeOutline.focus(); 84 this._layerTreeOutline.focus();
84 }, 85 },
85 86
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 reveal: function(snapshotData) 178 reveal: function(snapshotData)
178 { 179 {
179 if (!(snapshotData instanceof WebInspector.DeferredLayerTree)) 180 if (!(snapshotData instanceof WebInspector.DeferredLayerTree))
180 return Promise.reject(new Error("Internal error: not a WebInspector. DeferredLayerTree")); 181 return Promise.reject(new Error("Internal error: not a WebInspector. DeferredLayerTree"));
181 var panel = /** @type {!WebInspector.LayersPanel} */ (self.runtime.share dInstance(WebInspector.LayersPanel)); 182 var panel = /** @type {!WebInspector.LayersPanel} */ (self.runtime.share dInstance(WebInspector.LayersPanel));
182 WebInspector.inspectorView.setCurrentPanel(panel); 183 WebInspector.inspectorView.setCurrentPanel(panel);
183 panel._showLayerTree(/** @type {!WebInspector.DeferredLayerTree} */ (sna pshotData)); 184 panel._showLayerTree(/** @type {!WebInspector.DeferredLayerTree} */ (sna pshotData));
184 return Promise.resolve(); 185 return Promise.resolve();
185 } 186 }
186 } 187 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698