| 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 'settings-device-page' is the settings page for device and | 6 * @fileoverview 'settings-device-page' is the settings page for device and |
| 7 * peripheral settings. | 7 * peripheral settings. |
| 8 */ | 8 */ |
| 9 Polymer({ | 9 Polymer({ |
| 10 is: 'settings-device-page', | 10 is: 'settings-device-page', |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 }, | 35 }, |
| 36 | 36 |
| 37 /** @private */ | 37 /** @private */ |
| 38 stylusAllowed_: { | 38 stylusAllowed_: { |
| 39 type: Boolean, | 39 type: Boolean, |
| 40 value: function() { | 40 value: function() { |
| 41 return loadTimeData.getBoolean('stylusAllowed'); | 41 return loadTimeData.getBoolean('stylusAllowed'); |
| 42 }, | 42 }, |
| 43 readOnly: true, | 43 readOnly: true, |
| 44 }, | 44 }, |
| 45 | |
| 46 /** @private */ | |
| 47 showStorageManager_: { | |
| 48 type: Boolean, | |
| 49 value: function() { | |
| 50 return loadTimeData.getBoolean('showStorageManager'); | |
| 51 }, | |
| 52 readOnly: true, | |
| 53 }, | |
| 54 }, | 45 }, |
| 55 | 46 |
| 56 observers: [ | 47 observers: [ |
| 57 'pointersChanged_(hasMouse_, hasTouchpad_)', | 48 'pointersChanged_(hasMouse_, hasTouchpad_)', |
| 58 ], | 49 ], |
| 59 | 50 |
| 60 ready: function() { | 51 ready: function() { |
| 61 cr.addWebUIListener('has-mouse-changed', this.set.bind(this, 'hasMouse_')); | 52 cr.addWebUIListener('has-mouse-changed', this.set.bind(this, 'hasMouse_')); |
| 62 cr.addWebUIListener( | 53 cr.addWebUIListener( |
| 63 'has-touchpad-changed', this.set.bind(this, 'hasTouchpad_')); | 54 'has-touchpad-changed', this.set.bind(this, 'hasTouchpad_')); |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 * Leaves the pointer subpage if all pointing devices are detached. | 140 * Leaves the pointer subpage if all pointing devices are detached. |
| 150 * @private | 141 * @private |
| 151 */ | 142 */ |
| 152 checkPointerSubpage_: function() { | 143 checkPointerSubpage_: function() { |
| 153 if (!this.hasMouse_ && !this.hasTouchpad_ && | 144 if (!this.hasMouse_ && !this.hasTouchpad_ && |
| 154 settings.getCurrentRoute() == settings.Route.POINTERS) { | 145 settings.getCurrentRoute() == settings.Route.POINTERS) { |
| 155 settings.navigateTo(settings.Route.DEVICE); | 146 settings.navigateTo(settings.Route.DEVICE); |
| 156 } | 147 } |
| 157 }, | 148 }, |
| 158 }); | 149 }); |
| OLD | NEW |