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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/ui/GlassPane.js

Issue 2851213005: DevTools: brush up audits 2 launcher UI, allow multiple audit runs, introduce landing page. (Closed)
Patch Set: for landing Created 3 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
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 UI.GlassPane = class { 5 UI.GlassPane = class {
6 constructor() { 6 constructor() {
7 this._widget = new UI.Widget(true); 7 this._widget = new UI.Widget(true);
8 this._widget.markAsRoot(); 8 this._widget.markAsRoot();
9 this.element = this._widget.element; 9 this.element = this._widget.element;
10 this.contentElement = this._widget.contentElement; 10 this.contentElement = this._widget.contentElement;
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 setPointerEventsBehavior(pointerEventsBehavior) { 57 setPointerEventsBehavior(pointerEventsBehavior) {
58 this.element.classList.toggle( 58 this.element.classList.toggle(
59 'no-pointer-events', pointerEventsBehavior !== UI.GlassPane.PointerEvent sBehavior.BlockedByGlassPane); 59 'no-pointer-events', pointerEventsBehavior !== UI.GlassPane.PointerEvent sBehavior.BlockedByGlassPane);
60 this.contentElement.classList.toggle( 60 this.contentElement.classList.toggle(
61 'no-pointer-events', pointerEventsBehavior === UI.GlassPane.PointerEvent sBehavior.PierceContents); 61 'no-pointer-events', pointerEventsBehavior === UI.GlassPane.PointerEvent sBehavior.PierceContents);
62 } 62 }
63 63
64 /** 64 /**
65 * @param {?function(!Event)} callback 65 * @param {?function(!Event)} callback
66 */ 66 */
67 setSetOutsideClickCallback(callback) { 67 setOutsideClickCallback(callback) {
68 this._onClickOutsideCallback = callback; 68 this._onClickOutsideCallback = callback;
69 } 69 }
70 70
71 /** 71 /**
72 * @param {?UI.Size} size 72 * @param {?UI.Size} size
73 */ 73 */
74 setMaxContentSize(size) { 74 setMaxContentSize(size) {
75 this._maxSize = size; 75 this._maxSize = size;
76 this._positionContent(); 76 this._positionContent();
77 } 77 }
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 UI.GlassPane.MarginBehavior = { 394 UI.GlassPane.MarginBehavior = {
395 Arrow: Symbol('Arrow'), 395 Arrow: Symbol('Arrow'),
396 DefaultMargin: Symbol('DefaultMargin'), 396 DefaultMargin: Symbol('DefaultMargin'),
397 NoMargin: Symbol('NoMargin') 397 NoMargin: Symbol('NoMargin')
398 }; 398 };
399 399
400 /** @type {!Map<!Document, !Element>} */ 400 /** @type {!Map<!Document, !Element>} */
401 UI.GlassPane._containers = new Map(); 401 UI.GlassPane._containers = new Map();
402 /** @type {!Set<!UI.GlassPane>} */ 402 /** @type {!Set<!UI.GlassPane>} */
403 UI.GlassPane._panes = new Set(); 403 UI.GlassPane._panes = new Set();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698