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 /** | 5 /** |
6 * @fileoverview | 6 * @fileoverview |
7 * 'settings-keyboard' is the settings subpage with keyboard settings. | 7 * 'settings-keyboard' is the settings subpage with keyboard settings. |
8 */ | 8 */ |
9 | 9 |
10 // TODO(michaelpg): The docs below are duplicates of settings_dropdown_menu, | 10 // TODO(michaelpg): The docs below are duplicates of settings_dropdown_menu, |
11 // because we can't depend on settings_dropdown_menu in compiled_resources2.gyp | 11 // because we can't depend on settings_dropdown_menu in compiled_resources2.gyp |
12 // withhout first converting settings_dropdown_menu to compiled_resources2.gyp. | 12 // withhout first converting settings_dropdown_menu to compiled_resources2.gyp. |
13 // After the conversion, we should remove these. | 13 // After the conversion, we should remove these. |
14 /** @typedef {{name: string, value: (number|string)}} */ | 14 /** @typedef {{name: string, value: (number|string)}} */ |
15 var DropdownMenuOption; | 15 var DropdownMenuOption; |
16 /** @typedef {!Array<!DropdownMenuOption>} */ | 16 /** @typedef {!Array<!DropdownMenuOption>} */ |
17 var DropdownMenuOptionList; | 17 var DropdownMenuOptionList; |
18 | 18 |
19 Polymer({ | 19 Polymer({ |
20 is: 'settings-keyboard', | 20 is: 'settings-keyboard', |
21 | 21 |
22 properties: { | 22 properties: { |
23 /** Preferences state. */ | 23 /** Preferences state. */ |
24 prefs: { | 24 prefs: { |
25 type: Object, | 25 type: Object, |
26 notify: true, | 26 notify: true, |
27 }, | 27 }, |
28 | 28 |
29 /** The current active route. */ | |
30 currentRoute: { | |
31 type: Object, | |
32 notify: true, | |
33 }, | |
34 | |
35 /** @private Whether to show Caps Lock options. */ | 29 /** @private Whether to show Caps Lock options. */ |
36 showCapsLock_: Boolean, | 30 showCapsLock_: Boolean, |
37 | 31 |
38 /** @private Whether to show diamond key options. */ | 32 /** @private Whether to show diamond key options. */ |
39 showDiamondKey_: Boolean, | 33 showDiamondKey_: Boolean, |
40 | 34 |
41 /** @private {!DropdownMenuOptionList} Menu items for key mapping. */ | 35 /** @private {!DropdownMenuOptionList} Menu items for key mapping. */ |
42 keyMapTargets_: Object, | 36 keyMapTargets_: Object, |
43 | 37 |
44 /** | 38 /** |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 this.showCapsLock_ = showCapsLock; | 104 this.showCapsLock_ = showCapsLock; |
111 this.showDiamondKey_ = showDiamondKey; | 105 this.showDiamondKey_ = showDiamondKey; |
112 }, | 106 }, |
113 | 107 |
114 onShowKeyboardShortcutsOverlayTap_: function() { | 108 onShowKeyboardShortcutsOverlayTap_: function() { |
115 settings.DevicePageBrowserProxyImpl.getInstance() | 109 settings.DevicePageBrowserProxyImpl.getInstance() |
116 .showKeyboardShortcutsOverlay(); | 110 .showKeyboardShortcutsOverlay(); |
117 }, | 111 }, |
118 | 112 |
119 onShowLanguageInputTap_: function() { | 113 onShowLanguageInputTap_: function() { |
120 this.currentRoute = { | 114 settings.navigateTo(settings.Route.LANGUAGES); |
121 page: 'advanced', | |
122 section: 'languages', | |
123 subpage: [], | |
124 }; | |
125 }, | 115 }, |
126 }); | 116 }); |
OLD | NEW |