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

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

Issue 1113813002: [DevTools] Rename View to Widget. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebased Created 5 years, 7 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.Widget}
8 * @implements {WebInspector.TargetManager.Observer} 8 * @implements {WebInspector.TargetManager.Observer}
9 */ 9 */
10 WebInspector.MediaQueryInspector = function() 10 WebInspector.MediaQueryInspector = function()
11 { 11 {
12 WebInspector.View.call(this); 12 WebInspector.Widget.call(this);
13 this.element.classList.add("media-inspector-view", "media-inspector-view-emp ty"); 13 this.element.classList.add("media-inspector-view", "media-inspector-view-emp ty");
14 this.element.addEventListener("click", this._onMediaQueryClicked.bind(this), false); 14 this.element.addEventListener("click", this._onMediaQueryClicked.bind(this), false);
15 this.element.addEventListener("contextmenu", this._onContextMenu.bind(this), false); 15 this.element.addEventListener("contextmenu", this._onContextMenu.bind(this), false);
16 this._mediaThrottler = new WebInspector.Throttler(0); 16 this._mediaThrottler = new WebInspector.Throttler(0);
17 17
18 this._offset = 0; 18 this._offset = 0;
19 this._scale = 1; 19 this._scale = 1;
20 this._lastReportedCount = 0; 20 this._lastReportedCount = 0;
21 21
22 WebInspector.targetManager.observeTargets(this); 22 WebInspector.targetManager.observeTargets(this);
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 if (model.maxWidthExpression()) { 352 if (model.maxWidthExpression()) {
353 var labelClass = model.section() === WebInspector.MediaQueryInspecto r.Section.MinMax ? "media-inspector-label-left" : "media-inspector-label-right"; 353 var labelClass = model.section() === WebInspector.MediaQueryInspecto r.Section.MinMax ? "media-inspector-label-left" : "media-inspector-label-right";
354 var labelContainer = markerElement.createChild("div", "media-inspect or-marker-label-container media-inspector-marker-label-container-right"); 354 var labelContainer = markerElement.createChild("div", "media-inspect or-marker-label-container media-inspector-marker-label-container-right");
355 labelContainer.createChild("span", "media-inspector-marker-label " + labelClass).textContent = model.maxWidthExpression().value() + model.maxWidthEx pression().unit(); 355 labelContainer.createChild("span", "media-inspector-marker-label " + labelClass).textContent = model.maxWidthExpression().value() + model.maxWidthEx pression().unit();
356 } 356 }
357 markerElement.title = model.mediaText(); 357 markerElement.title = model.mediaText();
358 358
359 return markerElement; 359 return markerElement;
360 }, 360 },
361 361
362 __proto__: WebInspector.View.prototype 362 __proto__: WebInspector.Widget.prototype
363 }; 363 };
364 364
365 /** 365 /**
366 * @constructor 366 * @constructor
367 * @param {!WebInspector.CSSMedia} cssMedia 367 * @param {!WebInspector.CSSMedia} cssMedia
368 * @param {?WebInspector.CSSMediaQueryExpression} minWidthExpression 368 * @param {?WebInspector.CSSMediaQueryExpression} minWidthExpression
369 * @param {?WebInspector.CSSMediaQueryExpression} maxWidthExpression 369 * @param {?WebInspector.CSSMediaQueryExpression} maxWidthExpression
370 * @param {boolean} active 370 * @param {boolean} active
371 */ 371 */
372 WebInspector.MediaQueryInspector.MediaQueryUIModel = function(cssMedia, minWidth Expression, maxWidthExpression, active) 372 WebInspector.MediaQueryInspector.MediaQueryUIModel = function(cssMedia, minWidth Expression, maxWidthExpression, active)
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 }, 507 },
508 508
509 /** 509 /**
510 * @return {boolean} 510 * @return {boolean}
511 */ 511 */
512 active: function() 512 active: function()
513 { 513 {
514 return this._active; 514 return this._active;
515 } 515 }
516 } 516 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698