OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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-default-browser-page' is the settings page that contains | 7 * 'settings-default-browser-page' is the settings page that contains |
8 * settings to change the default browser (i.e. which the OS will open). | 8 * settings to change the default browser (i.e. which the OS will open). |
9 */ | 9 */ |
10 Polymer({ | 10 Polymer({ |
(...skipping 16 matching lines...) Expand all Loading... |
27 }, | 27 }, |
28 | 28 |
29 /** @private {settings.DefaultBrowserBrowserProxy} */ | 29 /** @private {settings.DefaultBrowserBrowserProxy} */ |
30 browserProxy_: null, | 30 browserProxy_: null, |
31 | 31 |
32 /** @override */ | 32 /** @override */ |
33 created: function() { | 33 created: function() { |
34 this.browserProxy_ = settings.DefaultBrowserBrowserProxyImpl.getInstance(); | 34 this.browserProxy_ = settings.DefaultBrowserBrowserProxyImpl.getInstance(); |
35 }, | 35 }, |
36 | 36 |
| 37 /** @override */ |
37 ready: function() { | 38 ready: function() { |
38 this.addWebUIListener('settings.updateDefaultBrowserState', | 39 this.addWebUIListener('settings.updateDefaultBrowserState', |
39 this.updateDefaultBrowserState_.bind(this)); | 40 this.updateDefaultBrowserState_.bind(this)); |
40 | 41 |
41 this.browserProxy_.requestDefaultBrowserState().then( | 42 this.browserProxy_.requestDefaultBrowserState().then( |
42 this.updateDefaultBrowserState_.bind(this)); | 43 this.updateDefaultBrowserState_.bind(this)); |
43 }, | 44 }, |
44 | 45 |
45 /** | 46 /** |
46 * @param {!DefaultBrowserInfo} defaultBrowserState | 47 * @param {!DefaultBrowserInfo} defaultBrowserState |
(...skipping 14 matching lines...) Expand all Loading... |
61 this.maySetDefaultBrowser_ = true; | 62 this.maySetDefaultBrowser_ = true; |
62 else | 63 else |
63 this.isUnknownError_ = true; | 64 this.isUnknownError_ = true; |
64 }, | 65 }, |
65 | 66 |
66 /** @private */ | 67 /** @private */ |
67 onSetDefaultBrowserTap_: function() { | 68 onSetDefaultBrowserTap_: function() { |
68 this.browserProxy_.setAsDefaultBrowser(); | 69 this.browserProxy_.setAsDefaultBrowser(); |
69 }, | 70 }, |
70 }); | 71 }); |
OLD | NEW |