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-ui' implements the UI for the Settings page. | 7 * 'settings-ui' implements the UI for the Settings page. |
8 * | 8 * |
9 * Example: | 9 * Example: |
10 * | 10 * |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
59 toolbarSpinnerActive_: { | 59 toolbarSpinnerActive_: { |
60 type: Boolean, | 60 type: Boolean, |
61 value: false, | 61 value: false, |
62 }, | 62 }, |
63 }, | 63 }, |
64 | 64 |
65 listeners: { | 65 listeners: { |
66 'sideNav.iron-activate': 'onIronActivate_', | 66 'sideNav.iron-activate': 'onIronActivate_', |
67 }, | 67 }, |
68 | 68 |
69 /** @override */ | |
70 ready: function() { | |
71 this.$$('cr-toolbar').addEventListener('search-changed', function(e) { | |
72 this.$$('settings-main').searchContents(e.detail); | |
73 }.bind(this)); | |
74 | |
75 if (loadTimeData.getBoolean('isGuest')) { | |
76 this.pageVisibility_ = { | |
dpapad
2016/07/21 18:33:33
Where is this private member var declared? I don't
Moe
2016/07/22 16:59:56
Done.
| |
77 people: false, | |
78 onStartup: false, | |
79 reset: false, | |
80 <if expr="not chromeos"> | |
81 appearance: false, | |
82 defaultBrowser: false, | |
83 | |
84 hideAdvancedSettings: true, | |
85 </if> | |
86 <if expr="chromeos"> | |
87 appearance: { | |
88 setWallpaper: false, | |
89 setTheme: false, | |
90 homeButton: false, | |
91 bookmarksBar: false, | |
92 pageZoom: false, | |
93 }, | |
94 dateTime: { | |
95 timeZoneSelector: false, | |
96 }, | |
97 privacy: { | |
98 networkPrediction: false, | |
99 }, | |
100 passwordsAndForms: false, | |
101 downloads: { | |
102 googleDrive: false, | |
103 }, | |
104 </if> | |
105 }; | |
106 } | |
107 }, | |
108 | |
69 /** @private */ | 109 /** @private */ |
70 onCloseAppealTap_: function() { | 110 onCloseAppealTap_: function() { |
71 window.sessionStorage.appealClosed_ = this.appealClosed_ = true; | 111 window.sessionStorage.appealClosed_ = this.appealClosed_ = true; |
72 }, | 112 }, |
73 | 113 |
74 /** | 114 /** |
75 * @param {Event} event | 115 * @param {Event} event |
76 * @private | 116 * @private |
77 */ | 117 */ |
78 onIronActivate_: function(event) { | 118 onIronActivate_: function(event) { |
79 if (event.detail.item.id != 'advancedPage') | 119 if (event.detail.item.id != 'advancedPage') |
80 this.$$('app-drawer').close(); | 120 this.$$('app-drawer').close(); |
81 }, | 121 }, |
82 | 122 |
83 /** @private */ | 123 /** @private */ |
84 onMenuButtonTap_: function() { | 124 onMenuButtonTap_: function() { |
85 this.$$('app-drawer').toggle(); | 125 this.$$('app-drawer').toggle(); |
86 }, | 126 }, |
87 | 127 |
88 /** @override */ | |
89 ready: function() { | |
90 this.$$('cr-toolbar').addEventListener('search-changed', function(e) { | |
91 this.$$('settings-main').searchContents(e.detail); | |
92 }.bind(this)); | |
93 }, | |
94 | |
95 /** @private */ | 128 /** @private */ |
96 directionDelegateChanged_: function() { | 129 directionDelegateChanged_: function() { |
97 this.$$('app-drawer').align = this.directionDelegate.isRtl() ? | 130 this.$$('app-drawer').align = this.directionDelegate.isRtl() ? |
98 'right' : 'left'; | 131 'right' : 'left'; |
99 }, | 132 }, |
100 }); | 133 }); |
OLD | NEW |