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 <link rel="import" href="/tracing/base/guid.html"> | 7 <link rel="import" href="/tracing/base/guid.html"> |
8 <link rel="import" href="/tracing/ui/base/hot_key.html"> | 8 <link rel="import" href="/tracing/ui/base/hot_key.html"> |
9 | 9 |
10 <dom-module id='tv-ui-b-hotkey-controller'> | 10 <dom-module id='tv-ui-b-hotkey-controller'> |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 for (var i = 0; i < this.childControllers_.length; i++) { | 226 for (var i = 0; i < this.childControllers_.length; i++) { |
227 var controller = this.childControllers_[i]; | 227 var controller = this.childControllers_[i]; |
228 controller.appendMatchingHotKeysTo_(matchedHotKeys, | 228 controller.appendMatchingHotKeysTo_(matchedHotKeys, |
229 useCapture, e); | 229 useCapture, e); |
230 } | 230 } |
231 }, | 231 }, |
232 | 232 |
233 onKey_: function(useCapture, e) { | 233 onKey_: function(useCapture, e) { |
234 // Keys dispatched to INPUT elements still bubble, even when they're | 234 // Keys dispatched to INPUT elements still bubble, even when they're |
235 // handled. So, skip any events that targeted the input element. | 235 // handled. So, skip any events that targeted the input element. |
236 if (useCapture == false && e.path[0].tagName == 'INPUT') | 236 if (!useCapture && e.path[0].tagName === 'INPUT') |
237 return; | 237 return; |
238 | 238 |
239 var sortedControllers; | 239 var sortedControllers; |
240 | 240 |
241 var matchedHotKeys = []; | 241 var matchedHotKeys = []; |
242 this.appendMatchingHotKeysTo_(matchedHotKeys, useCapture, e); | 242 this.appendMatchingHotKeysTo_(matchedHotKeys, useCapture, e); |
243 | 243 |
244 if (matchedHotKeys.length === 0) | 244 if (matchedHotKeys.length === 0) |
245 return false; | 245 return false; |
246 | 246 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
293 node = Polymer.dom(node).parentNode; | 293 node = Polymer.dom(node).parentNode; |
294 } | 294 } |
295 return node.host; | 295 return node.host; |
296 } | 296 } |
297 | 297 |
298 return { | 298 return { |
299 getHotkeyControllerForElement: getHotkeyControllerForElement | 299 getHotkeyControllerForElement: getHotkeyControllerForElement |
300 }; | 300 }; |
301 }); | 301 }); |
302 </script> | 302 </script> |
OLD | NEW |