OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 * @unrestricted | 5 * @unrestricted |
6 */ | 6 */ |
7 UI.SwatchPopoverHelper = class extends Common.Object { | 7 InlineEditor.SwatchPopoverHelper = class extends Common.Object { |
8 constructor() { | 8 constructor() { |
9 super(); | 9 super(); |
10 this._popover = new UI.Popover(); | 10 this._popover = new UI.Popover(); |
11 this._popover.setCanShrink(false); | 11 this._popover.setCanShrink(false); |
12 this._popover.setNoPadding(true); | 12 this._popover.setNoPadding(true); |
13 this._popover.element.addEventListener('mousedown', (e) => e.consume(), fals
e); | 13 this._popover.element.addEventListener('mousedown', (e) => e.consume(), fals
e); |
14 | 14 |
15 this._hideProxy = this.hide.bind(this, true); | 15 this._hideProxy = this.hide.bind(this, true); |
16 this._boundOnKeyDown = this._onKeyDown.bind(this); | 16 this._boundOnKeyDown = this._onKeyDown.bind(this); |
17 this._boundFocusOut = this._onFocusOut.bind(this); | 17 this._boundFocusOut = this._onFocusOut.bind(this); |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 this.hide(true); | 104 this.hide(true); |
105 event.consume(true); | 105 event.consume(true); |
106 return; | 106 return; |
107 } | 107 } |
108 if (event.key === 'Escape') { | 108 if (event.key === 'Escape') { |
109 this.hide(false); | 109 this.hide(false); |
110 event.consume(true); | 110 event.consume(true); |
111 } | 111 } |
112 } | 112 } |
113 }; | 113 }; |
OLD | NEW |