| OLD | NEW | 
|---|
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> | 
| 2 <!-- | 2 <!-- | 
| 3 Copyright (c) 2014 The Chromium Authors. All rights reserved. | 3 Copyright (c) 2014 The Chromium Authors. All rights reserved. | 
| 4 Use of this source code is governed by a BSD-style license that can be | 4 Use of this source code is governed by a BSD-style license that can be | 
| 5 found in the LICENSE file. | 5 found in the LICENSE file. | 
| 6 --> | 6 --> | 
| 7 | 7 | 
| 8 <link rel="import" href="/tracing/base/event.html"> | 8 <link rel="import" href="/tracing/base/event.html"> | 
| 9 <link rel="import" href="/tracing/base/utils.html"> | 9 <link rel="import" href="/tracing/base/utils.html"> | 
| 10 <link rel="import" href="/tracing/ui/base/ui.html"> | 10 <link rel="import" href="/tracing/ui/base/ui.html"> | 
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 135    */ | 135    */ | 
| 136   var Overlay = tr.ui.b.define('overlay'); | 136   var Overlay = tr.ui.b.define('overlay'); | 
| 137 | 137 | 
| 138   Overlay.prototype = { | 138   Overlay.prototype = { | 
| 139     __proto__: HTMLDivElement.prototype, | 139     __proto__: HTMLDivElement.prototype, | 
| 140 | 140 | 
| 141     /** | 141     /** | 
| 142      * Initializes the overlay element. | 142      * Initializes the overlay element. | 
| 143      */ | 143      */ | 
| 144     decorate: function() { | 144     decorate: function() { | 
| 145       this.classList.add('overlay'); | 145       Polymer.dom(this).classList.add('overlay'); | 
| 146 | 146 | 
| 147       this.parentEl_ = this.ownerDocument.body; | 147       this.parentEl_ = this.ownerDocument.body; | 
| 148 | 148 | 
| 149       this.visible_ = false; | 149       this.visible_ = false; | 
| 150       this.userCanClose_ = true; | 150       this.userCanClose_ = true; | 
| 151 | 151 | 
| 152       this.onKeyDown_ = this.onKeyDown_.bind(this); | 152       this.onKeyDown_ = this.onKeyDown_.bind(this); | 
| 153       this.onClick_ = this.onClick_.bind(this); | 153       this.onClick_ = this.onClick_.bind(this); | 
| 154       this.onFocusIn_ = this.onFocusIn_.bind(this); | 154       this.onFocusIn_ = this.onFocusIn_.bind(this); | 
| 155       this.onDocumentClick_ = this.onDocumentClick_.bind(this); | 155       this.onDocumentClick_ = this.onDocumentClick_.bind(this); | 
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 239         } else { | 239         } else { | 
| 240           focusEl = elList[0]; | 240           focusEl = elList[0]; | 
| 241         } | 241         } | 
| 242       } | 242       } | 
| 243       if (focusEl === undefined) | 243       if (focusEl === undefined) | 
| 244         focusEl = this; | 244         focusEl = this; | 
| 245       focusEl.focus(); | 245       focusEl.focus(); | 
| 246     }, | 246     }, | 
| 247 | 247 | 
| 248     hide_: function() { | 248     hide_: function() { | 
| 249       this.parentEl_.removeChild(this); | 249       Polymer.dom(this.parentEl_).removeChild(this); | 
| 250 | 250 | 
| 251       this.parentEl_.removeEventListener('focusin', this.onFocusIn_); | 251       this.parentEl_.removeEventListener('focusin', this.onFocusIn_); | 
| 252 | 252 | 
| 253       if (this.closeBtn_) | 253       if (this.closeBtn_) | 
| 254         this.closeBtn_.removeEventListener('click', this.onClose_); | 254         this.closeBtn_.removeEventListener('click', this.onClose_); | 
| 255 | 255 | 
| 256       document.removeEventListener('keydown', this.onKeyDown_); | 256       document.removeEventListener('keydown', this.onKeyDown_); | 
| 257       document.removeEventListener('click', this.onDocumentClick_); | 257       document.removeEventListener('click', this.onDocumentClick_); | 
| 258     }, | 258     }, | 
| 259 | 259 | 
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 331     Polymer.dom(o.buttons).appendChild(b); | 331     Polymer.dom(o.buttons).appendChild(b); | 
| 332     o.visible = true; | 332     o.visible = true; | 
| 333     return o; | 333     return o; | 
| 334   }; | 334   }; | 
| 335 | 335 | 
| 336   return { | 336   return { | 
| 337     Overlay: Overlay | 337     Overlay: Overlay | 
| 338   }; | 338   }; | 
| 339 }); | 339 }); | 
| 340 </script> | 340 </script> | 
| OLD | NEW | 
|---|