| 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 /** @fileoverview A helper object used for testing the Device page. */ | 5 /** @fileoverview A helper object used for testing the Device page. */ |
| 6 cr.exportPath('settings'); | 6 cr.exportPath('settings'); |
| 7 | 7 |
| 8 /** | 8 /** |
| 9 * Mirrors DeviceType from ash/common/system/chromeos/power/power_status.h. | 9 * Mirrors DeviceType from ash/common/system/chromeos/power/power_status.h. |
| 10 * @enum {number} | 10 * @enum {number} |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 setPowerSource: function(powerSourceId) {}, | 73 setPowerSource: function(powerSourceId) {}, |
| 74 | 74 |
| 75 /** | 75 /** |
| 76 * |callback| is run when there is new note-taking app information | 76 * |callback| is run when there is new note-taking app information |
| 77 * available or after |requestNoteTakingApps| has been called. | 77 * available or after |requestNoteTakingApps| has been called. |
| 78 * @param {function(Array<settings.NoteAppInfo>, boolean):void} callback | 78 * @param {function(Array<settings.NoteAppInfo>, boolean):void} callback |
| 79 */ | 79 */ |
| 80 setNoteTakingAppsUpdatedCallback: function(callback) {}, | 80 setNoteTakingAppsUpdatedCallback: function(callback) {}, |
| 81 | 81 |
| 82 /** | 82 /** |
| 83 * Open up the play store with the given URL. |
| 84 * @param {string} url |
| 85 */ |
| 86 showPlayStore: function(url) {}, |
| 87 |
| 88 /** |
| 83 * Request current note-taking app info. Invokes any callback registered in | 89 * Request current note-taking app info. Invokes any callback registered in |
| 84 * |onNoteTakingAppsUpdated|. | 90 * |onNoteTakingAppsUpdated|. |
| 85 */ | 91 */ |
| 86 requestNoteTakingApps: function() {}, | 92 requestNoteTakingApps: function() {}, |
| 87 | 93 |
| 88 /** | 94 /** |
| 89 * Changes the preferred note taking app. | 95 * Changes the preferred note taking app. |
| 90 * @param {string} appId The app id. This should be a value retrieved from a | 96 * @param {string} appId The app id. This should be a value retrieved from a |
| 91 * |onNoteTakingAppsUpdated| callback. | 97 * |onNoteTakingAppsUpdated| callback. |
| 92 */ | 98 */ |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 setPowerSource: function(powerSourceId) { | 144 setPowerSource: function(powerSourceId) { |
| 139 chrome.send('setPowerSource', [powerSourceId]); | 145 chrome.send('setPowerSource', [powerSourceId]); |
| 140 }, | 146 }, |
| 141 | 147 |
| 142 /** @override */ | 148 /** @override */ |
| 143 setNoteTakingAppsUpdatedCallback: function(callback) { | 149 setNoteTakingAppsUpdatedCallback: function(callback) { |
| 144 cr.addWebUIListener('onNoteTakingAppsUpdated', callback); | 150 cr.addWebUIListener('onNoteTakingAppsUpdated', callback); |
| 145 }, | 151 }, |
| 146 | 152 |
| 147 /** @override */ | 153 /** @override */ |
| 154 showPlayStore: function(url) { |
| 155 chrome.send('showPlayStoreApps', [url]); |
| 156 }, |
| 157 |
| 158 /** @override */ |
| 148 requestNoteTakingApps: function() { | 159 requestNoteTakingApps: function() { |
| 149 chrome.send('requestNoteTakingApps'); | 160 chrome.send('requestNoteTakingApps'); |
| 150 }, | 161 }, |
| 151 | 162 |
| 152 /** @override */ | 163 /** @override */ |
| 153 setPreferredNoteTakingApp: function(appId) { | 164 setPreferredNoteTakingApp: function(appId) { |
| 154 chrome.send('setPreferredNoteTakingApp', [appId]); | 165 chrome.send('setPreferredNoteTakingApp', [appId]); |
| 155 }, | 166 }, |
| 156 }; | 167 }; |
| 157 | 168 |
| 158 return { | 169 return { |
| 159 DevicePageBrowserProxy: DevicePageBrowserProxy, | 170 DevicePageBrowserProxy: DevicePageBrowserProxy, |
| 160 DevicePageBrowserProxyImpl: DevicePageBrowserProxyImpl, | 171 DevicePageBrowserProxyImpl: DevicePageBrowserProxyImpl, |
| 161 }; | 172 }; |
| 162 }); | 173 }); |
| OLD | NEW |