Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(204)

Side by Side Diff: chrome/browser/resources/settings/settings_ui/settings_ui.js

Issue 2106103006: MD Settings: cr/cros - Guest mode page visibility (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 url += encodeURIComponent(description); 53 url += encodeURIComponent(description);
54 return url; 54 return url;
55 }, 55 },
56 }, 56 },
57 57
58 /** @private {boolean} */ 58 /** @private {boolean} */
59 toolbarSpinnerActive_: { 59 toolbarSpinnerActive_: {
60 type: Boolean, 60 type: Boolean,
61 value: false, 61 value: false,
62 }, 62 },
63
64 /**
65 * Dictionary defining page visibility.
66 * @private {!GuestModePageVisibility}
67 */
68 pageVisibility_: {
69 type: Object,
70 },
63 }, 71 },
64 72
65 listeners: { 73 listeners: {
66 'sideNav.iron-activate': 'onIronActivate_', 74 'sideNav.iron-activate': 'onIronActivate_',
67 }, 75 },
68 76
69 /** @override */ 77 /**
78 * @override
79 * @suppress {es5Strict} Object literals cannot contain duplicate keys in ES5
80 * strict mode.
81 */
70 ready: function() { 82 ready: function() {
71 this.$$('cr-toolbar').addEventListener('search-changed', function(e) { 83 this.$$('cr-toolbar').addEventListener('search-changed', function(e) {
72 this.$$('settings-main').searchContents(e.detail); 84 this.$$('settings-main').searchContents(e.detail);
73 }.bind(this)); 85 }.bind(this));
74 86
75 window.addEventListener('popstate', function(e) { 87 window.addEventListener('popstate', function(e) {
76 this.$$('app-drawer').close(); 88 this.$$('app-drawer').close();
77 }.bind(this)); 89 }.bind(this));
90
91 if (loadTimeData.getBoolean('isGuest')) {
92 this.pageVisibility_ = {
93 people: false,
94 onStartup: false,
95 reset: false,
96 <if expr="not chromeos">
97 appearance: false,
98 defaultBrowser: false,
99 advancedSettings: false,
100 </if>
101 <if expr="chromeos">
102 appearance: {
103 setWallpaper: false,
104 setTheme: false,
105 homeButton: false,
106 bookmarksBar: false,
107 pageZoom: false,
108 },
109 advancedSettings: true,
110 dateTime: {
111 timeZoneSelector: false,
112 },
113 privacy: {
114 searchPrediction: false,
115 networkPrediction: false,
116 },
117 passwordsAndForms: false,
118 downloads: {
119 googleDrive: false,
120 },
121 </if>
122 };
123 }
78 }, 124 },
79 125
80 /** @private */ 126 /** @private */
81 onCloseAppealTap_: function() { 127 onCloseAppealTap_: function() {
82 window.sessionStorage.appealClosed_ = this.appealClosed_ = true; 128 window.sessionStorage.appealClosed_ = this.appealClosed_ = true;
83 }, 129 },
84 130
85 /** 131 /**
86 * @param {Event} event 132 * @param {Event} event
87 * @private 133 * @private
88 */ 134 */
89 onIronActivate_: function(event) { 135 onIronActivate_: function(event) {
90 if (event.detail.item.id != 'advancedPage') 136 if (event.detail.item.id != 'advancedPage')
91 this.$$('app-drawer').close(); 137 this.$$('app-drawer').close();
92 }, 138 },
93 139
94 /** @private */ 140 /** @private */
95 onMenuButtonTap_: function() { 141 onMenuButtonTap_: function() {
96 this.$$('app-drawer').toggle(); 142 this.$$('app-drawer').toggle();
97 }, 143 },
98 144
99 /** @private */ 145 /** @private */
100 directionDelegateChanged_: function() { 146 directionDelegateChanged_: function() {
101 this.$$('app-drawer').align = this.directionDelegate.isRtl() ? 147 this.$$('app-drawer').align = this.directionDelegate.isRtl() ?
102 'right' : 'left'; 148 'right' : 'left';
103 }, 149 },
104 }); 150 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698