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

Side by Side Diff: Source/devtools/front_end/toolbox/MediaQueryInspector.js

Issue 660503002: Revert of [DevTools] Inject element into toolbox window, do not load modules there. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @constructor 6 * @constructor
7 * @extends {WebInspector.View} 7 * @extends {WebInspector.View}
8 * @implements {WebInspector.TargetManager.Observer} 8 * @implements {WebInspector.TargetManager.Observer}
9 */ 9 */
10 WebInspector.MediaQueryInspector = function() 10 WebInspector.MediaQueryInspector = function()
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 var uiLocations = new StringMap(); 136 var uiLocations = new StringMap();
137 for (var i = 0; i < locations.length; ++i) { 137 for (var i = 0; i < locations.length; ++i) {
138 var uiLocation = WebInspector.cssWorkspaceBinding.rawLocationToUILoc ation(locations[i]); 138 var uiLocation = WebInspector.cssWorkspaceBinding.rawLocationToUILoc ation(locations[i]);
139 if (!uiLocation) 139 if (!uiLocation)
140 continue; 140 continue;
141 var descriptor = String.sprintf("%s:%d:%d", uiLocation.uiSourceCode. uri(), uiLocation.lineNumber + 1, uiLocation.columnNumber + 1); 141 var descriptor = String.sprintf("%s:%d:%d", uiLocation.uiSourceCode. uri(), uiLocation.lineNumber + 1, uiLocation.columnNumber + 1);
142 uiLocations.set(descriptor, uiLocation); 142 uiLocations.set(descriptor, uiLocation);
143 } 143 }
144 144
145 var contextMenuItems = uiLocations.keys().sort(); 145 var contextMenuItems = uiLocations.keys().sort();
146 var contextMenu = new WebInspector.ContextMenu(event, this.element.owner Document.defaultView); 146 var contextMenu = new WebInspector.ContextMenu(event);
147 var subMenuItem = contextMenu.appendSubMenuItem(WebInspector.UIString(We bInspector.useLowerCaseMenuTitles() ? "Reveal in source code" : "Reveal In Sourc e Code")); 147 var subMenuItem = contextMenu.appendSubMenuItem(WebInspector.UIString(We bInspector.useLowerCaseMenuTitles() ? "Reveal in source code" : "Reveal In Sourc e Code"));
148 for (var i = 0; i < contextMenuItems.length; ++i) { 148 for (var i = 0; i < contextMenuItems.length; ++i) {
149 var title = contextMenuItems[i]; 149 var title = contextMenuItems[i];
150 subMenuItem.appendItem(title, this._revealSourceLocation.bind(this, /** @type {!WebInspector.UILocation} */(uiLocations.get(title)))); 150 subMenuItem.appendItem(title, this._revealSourceLocation.bind(this, /** @type {!WebInspector.UILocation} */(uiLocations.get(title))));
151 } 151 }
152 contextMenu.show(); 152 contextMenu.show();
153 }, 153 },
154 154
155 /** 155 /**
156 * @param {!WebInspector.UILocation} location 156 * @param {!WebInspector.UILocation} location
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 }, 499 },
500 500
501 /** 501 /**
502 * @return {boolean} 502 * @return {boolean}
503 */ 503 */
504 active: function() 504 active: function()
505 { 505 {
506 return this._active; 506 return this._active;
507 } 507 }
508 } 508 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/toolbox.json ('k') | Source/devtools/front_end/toolbox/ToolboxDelegate.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698