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

Unified Diff: third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeView.js

Issue 2122353002: [DevTools] Make resource tree model optional (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: [DevTools] No RTM for non-browser targets 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/emulation/DeviceModeView.js
diff --git a/third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeView.js b/third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeView.js
index 486429cc3f224f0c0076684bcaf36d59ff928061..77a42d3bbe5562997a634e94040166fb3f0b3418 100644
--- a/third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeView.js
+++ b/third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeView.js
@@ -472,7 +472,8 @@ WebInspector.DeviceModeView.prototype = {
visiblePageRect.top,
Math.min(pageImage.naturalWidth, screenRect.width),
Math.min(pageImage.naturalHeight, screenRect.height));
- var mainFrame = mainTarget.resourceTreeModel.mainFrame;
+ var resourceTreeModel = mainTarget && WebInspector.ResourceTreeModel.fromTarget(mainTarget);
+ var mainFrame = resourceTreeModel && resourceTreeModel.mainFrame;
var fileName = mainFrame ? mainFrame.url.trimURL().removeURLFragment() : "";
dgozman 2016/08/19 20:23:37 All this code looks like WI.targetManager.inspecte
eostroukhov 2016/08/20 01:22:30 Done.
if (this._model.type() === WebInspector.DeviceModeModel.Type.Device)
fileName += WebInspector.UIString("(%s)", this._model.device().title);

Powered by Google App Engine
This is Rietveld 408576698