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

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

Issue 2624043002: Eliminate loadTimeData dependency from cr_elements/policy (Closed)
Patch Set: Show icons (just not tooltips) if CrPolicyStrings is not defiend Created 3 years, 11 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 ready: function() { 80 ready: function() {
81 // Lazy-create the drawer the first time it is opened or swiped into view. 81 // Lazy-create the drawer the first time it is opened or swiped into view.
82 listenOnce(this.$.drawer, 'open-changed', function() { 82 listenOnce(this.$.drawer, 'open-changed', function() {
83 this.$.drawerTemplate.if = true; 83 this.$.drawerTemplate.if = true;
84 }.bind(this)); 84 }.bind(this));
85 85
86 window.addEventListener('popstate', function(e) { 86 window.addEventListener('popstate', function(e) {
87 this.$.drawer.closeDrawer(); 87 this.$.drawer.closeDrawer();
88 }.bind(this)); 88 }.bind(this));
89 89
90 CrPolicyStrings = {
91 controlledSettingPolicy:
92 loadTimeData.getString('controlledSettingPolicy'),
93 controlledSettingRecommendedMatches:
94 loadTimeData.getString('controlledSettingRecommendedMatches'),
95 controlledSettingRecommendedDiffers:
96 loadTimeData.getString('controlledSettingRecommendedDiffers'),
97 // <if expr="chromeos">
98 controlledSettingShared:
99 loadTimeData.getString('controlledSettingShared'),
100 controlledSettingOwner: loadTimeData.getString('controlledSettingOwner'),
101 // </if>
102 };
103
90 if (loadTimeData.getBoolean('isGuest')) { 104 if (loadTimeData.getBoolean('isGuest')) {
91 this.pageVisibility_ = { 105 this.pageVisibility_ = {
92 people: false, 106 people: false,
93 onStartup: false, 107 onStartup: false,
94 reset: false, 108 reset: false,
95 // <if expr="not chromeos"> 109 // <if expr="not chromeos">
96 appearance: false, 110 appearance: false,
97 defaultBrowser: false, 111 defaultBrowser: false,
98 advancedSettings: false, 112 advancedSettings: false,
99 // </if> 113 // </if>
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 onMenuButtonTap_: function() { 208 onMenuButtonTap_: function() {
195 this.$.drawer.toggle(); 209 this.$.drawer.toggle();
196 }, 210 },
197 211
198 /** @private */ 212 /** @private */
199 directionDelegateChanged_: function() { 213 directionDelegateChanged_: function() {
200 this.$.drawer.align = this.directionDelegate.isRtl() ? 214 this.$.drawer.align = this.directionDelegate.isRtl() ?
201 'right' : 'left'; 215 'right' : 'left';
202 }, 216 },
203 }); 217 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698