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

Unified Diff: third_party/WebKit/Source/devtools/front_end/ui/View.js

Issue 2238003002: DevTools: migrate sources panel sidebar to views. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: followed up on the watch test. Created 4 years, 4 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: third_party/WebKit/Source/devtools/front_end/ui/View.js
diff --git a/third_party/WebKit/Source/devtools/front_end/ui/View.js b/third_party/WebKit/Source/devtools/front_end/ui/View.js
index 5b866d8d444c30a7234c1ea124471a82210ca52c..f8639361cc8017a3c55dde79370b85710b95dc20 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/View.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui/View.js
@@ -303,12 +303,14 @@ WebInspector.ViewManager = function()
WebInspector.ViewManager.prototype = {
/**
* @param {!WebInspector.Widget} widget
+ * @return {!Promise}
*/
revealViewWithWidget: function(widget)
{
var view = widget[WebInspector.View._symbol];
if (view)
- this.revealView(view);
+ return this.revealView(view);
+ return Promise.resolve();
},
/**
@@ -326,6 +328,15 @@ WebInspector.ViewManager.prototype = {
/**
* @param {string} viewId
+ * @return {?WebInspector.View}
+ */
+ view: function(viewId)
+ {
+ return this._views.get(viewId);
+ },
+
+ /**
+ * @param {string} viewId
* @return {!Promise}
*/
showView: function(viewId)
@@ -341,7 +352,7 @@ WebInspector.ViewManager.prototype = {
return this._resolveLocation(locationName).then(location => {
if (!location)
- return;
+ throw new Error("Could not resolve location for view: " + viewId);
location._reveal();
return location.showView(view);
});

Powered by Google App Engine
This is Rietveld 408576698