OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <!-- | 2 <!-- |
3 Copyright (c) 2013 The Chromium Authors. All rights reserved. | 3 Copyright (c) 2013 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/iteration_helpers.html"> | 9 <link rel="import" href="/tracing/base/iteration_helpers.html"> |
10 <link rel="import" href="/tracing/ui/base/hotkey_controller.html"> | 10 <link rel="import" href="/tracing/ui/base/hotkey_controller.html"> |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 this.modifierToModeMap_ = {}; | 115 this.modifierToModeMap_ = {}; |
116 | 116 |
117 this.targetElement_ = undefined; | 117 this.targetElement_ = undefined; |
118 this.modeBeforeAlternativeModeActivated_ = null; | 118 this.modeBeforeAlternativeModeActivated_ = null; |
119 | 119 |
120 this.isInteracting_ = false; | 120 this.isInteracting_ = false; |
121 this.isClick_ = false; | 121 this.isClick_ = false; |
122 }, | 122 }, |
123 | 123 |
124 ready: function() { | 124 ready: function() { |
125 this.buttonsEl_ = this.shadowRoot.querySelector('.buttons'); | 125 this.buttonsEl_ = this.root.querySelector('.buttons'); |
126 this.dragHandleEl_ = this.shadowRoot.querySelector('.drag-handle'); | 126 this.dragHandleEl_ = this.root.querySelector('.drag-handle'); |
127 this.supportedModeMask = MOUSE_SELECTOR_MODE.ALL_MODES; | 127 this.supportedModeMask = MOUSE_SELECTOR_MODE.ALL_MODES; |
128 | 128 |
129 this.dragHandleEl_.addEventListener('mousedown', | 129 this.dragHandleEl_.addEventListener('mousedown', |
130 this.onDragHandleMouseDown_.bind(this)); | 130 this.onDragHandleMouseDown_.bind(this)); |
131 | 131 |
132 this.buttonsEl_.addEventListener('mouseup', this.onButtonMouseUp_); | 132 this.buttonsEl_.addEventListener('mouseup', this.onButtonMouseUp_); |
133 this.buttonsEl_.addEventListener('mousedown', this.onButtonMouseDown_); | 133 this.buttonsEl_.addEventListener('mousedown', this.onButtonMouseDown_); |
134 this.buttonsEl_.addEventListener('click', this.onButtonPress_.bind(this)); | 134 this.buttonsEl_.addEventListener('click', this.onButtonPress_.bind(this)); |
135 }, | 135 }, |
136 | 136 |
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
565 this.dispatchEvent(mouseEvent); | 565 this.dispatchEvent(mouseEvent); |
566 } | 566 } |
567 }); | 567 }); |
568 | 568 |
569 return { | 569 return { |
570 MIN_MOUSE_SELECTION_DISTANCE: MIN_MOUSE_SELECTION_DISTANCE, | 570 MIN_MOUSE_SELECTION_DISTANCE: MIN_MOUSE_SELECTION_DISTANCE, |
571 MODIFIER: MODIFIER | 571 MODIFIER: MODIFIER |
572 }; | 572 }; |
573 }); | 573 }); |
574 </script> | 574 </script> |
OLD | NEW |