OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 cr.define('apps_dev_tool', function() { | 5 cr.define('apps_dev_tool', function() { |
6 'use strict'; | 6 'use strict'; |
7 | 7 |
8 /** | 8 /** |
9 * AppsDevTool constructor. | 9 * AppsDevTool constructor. |
10 * @constructor | 10 * @constructor |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 'stopInterceptingEvents'); | 89 'stopInterceptingEvents'); |
90 }; | 90 }; |
91 | 91 |
92 /** | 92 /** |
93 * Loads translated strings. | 93 * Loads translated strings. |
94 */ | 94 */ |
95 AppsDevTool.initStrings = function() { | 95 AppsDevTool.initStrings = function() { |
96 chrome.developerPrivate.getStrings(function(strings) { | 96 chrome.developerPrivate.getStrings(function(strings) { |
97 loadTimeData.data = strings; | 97 loadTimeData.data = strings; |
98 i18nTemplate.process(document, loadTimeData); | 98 i18nTemplate.process(document, loadTimeData); |
| 99 |
| 100 // Check managed profiles. |
| 101 chrome.developerPrivate.isProfileManaged(function(isManaged) { |
| 102 if (!isManaged) |
| 103 return; |
| 104 alertOverlay.setValues( |
| 105 loadTimeData.getString('managedProfileDialogTitle'), |
| 106 loadTimeData.getString('managedProfileDialogDescription'), |
| 107 loadTimeData.getString('managedProfileDialogCloseButton'), |
| 108 null, |
| 109 function() { |
| 110 AppsDevTool.showOverlay(null); |
| 111 window.close(); |
| 112 }, |
| 113 null); |
| 114 AppsDevTool.showOverlay($('alertOverlay')); |
| 115 }); |
99 }); | 116 }); |
100 }; | 117 }; |
101 | 118 |
102 return { | 119 return { |
103 AppsDevTool: AppsDevTool, | 120 AppsDevTool: AppsDevTool, |
104 }; | 121 }; |
105 }); | 122 }); |
OLD | NEW |