| 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 A helper object used from the "Change Picture" subpage of | 6 * @fileoverview A helper object used from the "Change Picture" subpage of |
| 7 * the People section to interact with the browser. ChromeOS only. | 7 * the People section to interact with the browser. ChromeOS only. |
| 8 */ | 8 */ |
| 9 cr.exportPath('settings'); | 9 cr.exportPath('settings'); |
| 10 | 10 |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 | 60 |
| 61 /** | 61 /** |
| 62 * Requests a file chooser to select a new user image. No response is | 62 * Requests a file chooser to select a new user image. No response is |
| 63 * expected. | 63 * expected. |
| 64 */ | 64 */ |
| 65 chooseFile: function() {}, | 65 chooseFile: function() {}, |
| 66 }; | 66 }; |
| 67 | 67 |
| 68 /** | 68 /** |
| 69 * @constructor | 69 * @constructor |
| 70 * @implements {ChangePictureBrowserProxy} | 70 * @implements {settings.ChangePictureBrowserProxy} |
| 71 */ | 71 */ |
| 72 function ChangePictureBrowserProxyImpl() {} | 72 function ChangePictureBrowserProxyImpl() {} |
| 73 // The singleton instance_ is replaced with a test version of this wrapper | 73 // The singleton instance_ is replaced with a test version of this wrapper |
| 74 // during testing. | 74 // during testing. |
| 75 cr.addSingletonGetter(ChangePictureBrowserProxyImpl); | 75 cr.addSingletonGetter(ChangePictureBrowserProxyImpl); |
| 76 | 76 |
| 77 ChangePictureBrowserProxyImpl.prototype = { | 77 ChangePictureBrowserProxyImpl.prototype = { |
| 78 /** @override */ | 78 /** @override */ |
| 79 initialize: function() { | 79 initialize: function() { |
| 80 chrome.send('onChangePicturePageInitialized'); | 80 chrome.send('onChangePicturePageInitialized'); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 100 chrome.send('photoTaken', [photoDataUrl]); | 100 chrome.send('photoTaken', [photoDataUrl]); |
| 101 }, | 101 }, |
| 102 | 102 |
| 103 /** @override */ | 103 /** @override */ |
| 104 chooseFile: function() { | 104 chooseFile: function() { |
| 105 chrome.send('chooseFile'); | 105 chrome.send('chooseFile'); |
| 106 }, | 106 }, |
| 107 }; | 107 }; |
| 108 | 108 |
| 109 return { | 109 return { |
| 110 ChangePictureBrowserProxy: ChangePictureBrowserProxy, |
| 110 ChangePictureBrowserProxyImpl: ChangePictureBrowserProxyImpl, | 111 ChangePictureBrowserProxyImpl: ChangePictureBrowserProxyImpl, |
| 111 }; | 112 }; |
| 112 }); | 113 }); |
| OLD | NEW |