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

Side by Side Diff: chrome/browser/resources/extensions_ui.html

Issue 165414: Disable an extension when it is upgraded to a version that requires more (Closed)
Patch Set: more comments Created 11 years, 4 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
« no previous file with comments | « chrome/browser/extensions/extensions_ui.cc ('k') | chrome/chrome.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE HTML> 1 <!DOCTYPE HTML>
2 <html> 2 <html>
3 <head> 3 <head>
4 <meta charset="utf-8"> 4 <meta charset="utf-8">
5 <title i18n-content="title"></title> 5 <title i18n-content="title"></title>
6 <script> 6 <script>
7 /** 7 /**
8 * This variable structure is here to document the structure that the template 8 * This variable structure is here to document the structure that the template
9 * expects to correctly populate the page. 9 * expects to correctly populate the page.
10 */ 10 */
11 var extensionDataFormat = { 11 var extensionDataFormat = {
12 "extensions": [ 12 "extensions": [
13 { 13 {
14 "id": "0000000000000000000000000000000000000000", 14 "id": "0000000000000000000000000000000000000000",
15 "name": "Extension Name", 15 "name": "Extension Name",
16 "description": "Extension long format description", 16 "description": "Extension long format description",
17 "version": "1.0.231", 17 "version": "1.0.231",
18 "enabled": "true",
18 "content_scripts": [ 19 "content_scripts": [
19 { 20 {
20 "js": ["script1_file1.js", "script1_file2.js"], 21 "js": ["script1_file1.js", "script1_file2.js"],
21 "css": ["script1_file1.css", "script1_file2.css"], 22 "css": ["script1_file1.css", "script1_file2.css"],
22 "matches": ["http://*/*", "http://other.com/*"] 23 "matches": ["http://*/*", "http://other.com/*"]
23 }, 24 },
24 { 25 {
25 "js": ["script2_file1.js", "script2_file2.js"], 26 "js": ["script2_file1.js", "script2_file2.js"],
26 "css": ["script2_file1.css", "script2_file2.css"], 27 "css": ["script2_file1.css", "script2_file2.css"],
27 "matches": ["http://*/*", "http://other.com/*"] 28 "matches": ["http://*/*", "http://other.com/*"]
(...skipping 14 matching lines...) Expand all
42 "renderViewId": 2, 43 "renderViewId": 2,
43 "renderProcessId": 1 44 "renderProcessId": 1
44 } 45 }
45 ] 46 ]
46 }, 47 },
47 { 48 {
48 "id": "0000000000000000000000000000000000000001", 49 "id": "0000000000000000000000000000000000000001",
49 "name": "Extension Name", 50 "name": "Extension Name",
50 "description": "Extension long format description", 51 "description": "Extension long format description",
51 "version": "1.0.231", 52 "version": "1.0.231",
53 "enabled": "true",
52 "content_scripts": [ 54 "content_scripts": [
53 { 55 {
54 "js": ["script1_file1.js", "script1_file2.js"], 56 "js": ["script1_file1.js", "script1_file2.js"],
55 "css": ["script1_file1.css", "script1_file2.css"], 57 "css": ["script1_file1.css", "script1_file2.css"],
56 "matches": ["http://*/*", "http://other.com/*"] 58 "matches": ["http://*/*", "http://other.com/*"]
57 }, 59 },
58 { 60 {
59 "js": ["script2_file1.js", "script2_file2.js"], 61 "js": ["script2_file1.js", "script2_file2.js"],
60 "css": ["script2_file1.css", "script2_file2.css"], 62 "css": ["script2_file1.css", "script2_file2.css"],
61 "matches": ["http://*/*", "http://other.com/*"] 63 "matches": ["http://*/*", "http://other.com/*"]
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 124
123 /** 125 /**
124 * Handles a 'reload' button getting clicked. 126 * Handles a 'reload' button getting clicked.
125 */ 127 */
126 function handleReloadExtension(node) { 128 function handleReloadExtension(node) {
127 // Tell the C++ ExtensionDOMHandler to reload the extension. 129 // Tell the C++ ExtensionDOMHandler to reload the extension.
128 chrome.send('reload', [node.extensionId]); 130 chrome.send('reload', [node.extensionId]);
129 } 131 }
130 132
131 /** 133 /**
134 * Handles a 'reenable' button getting clicked.
135 */
136 function handleEnableExtension(node) {
137 // Tell the C++ ExtensionDOMHandler to reload the extension.
138 chrome.send('enable', [node.extensionId]);
139 requestExtensionsData();
140 }
141
142 /**
132 * Handles an 'uninstall' button getting clicked. 143 * Handles an 'uninstall' button getting clicked.
133 */ 144 */
134 function handleUninstallExtension(node) { 145 function handleUninstallExtension(node) {
135 // Tell the C++ ExtensionDOMHandler to uninstall an extension. 146 // Tell the C++ ExtensionDOMHandler to uninstall an extension.
136 chrome.send('uninstall', [node.extensionId]); 147 chrome.send('uninstall', [node.extensionId]);
137 148
138 // Find the div above us with class 'extension' and remove it. 149 // Find the div above us with class 'extension' and remove it.
139 while (node) { 150 while (node) {
140 if (node.className == 'extension') { 151 if (node.className == 'extension') {
141 node.parentNode.removeChild(node); 152 node.parentNode.removeChild(node);
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 <div id="body-container" style="display:none;"> 251 <div id="body-container" style="display:none;">
241 <div id="outside"> 252 <div id="outside">
242 <div id="installed-extensions">Installed Extensions</div> 253 <div id="installed-extensions">Installed Extensions</div>
243 <div id="extensionTemplate"> 254 <div id="extensionTemplate">
244 255
245 <div class="extension-name" jsdisplay="extensions.length === 0"> 256 <div class="extension-name" jsdisplay="extensions.length === 0">
246 No Extensions Installed</div> 257 No Extensions Installed</div>
247 258
248 <div jsdisplay="extensions.length > 0"> 259 <div jsdisplay="extensions.length > 0">
249 <div class="extension" jsselect="extensions"> 260 <div class="extension" jsselect="extensions">
250 <div class="extension-name" jscontent="name">Extension Name</div> 261 <div class="extension-name">
262 <span jscontent="name">Extension Name</span>
263 <span jsdisplay="!enabled">(Disabled)</span>
264 </div>
251 <div class="extension-actions"> 265 <div class="extension-actions">
252 <button 266 <button
253 jsvalues=".extensionId:id" 267 jsvalues=".extensionId:id"
268 jsdisplay="!enabled"
269 onclick="handleEnableExtension(this)"
270 >Enable</button>
271 <button
272 jsvalues=".extensionId:id"
273 jsdisplay="enabled"
254 onclick="handleReloadExtension(this)" 274 onclick="handleReloadExtension(this)"
255 >Reload</button> 275 >Reload</button>
256 <button 276 <button
257 jsvalues=".extensionId:id" 277 jsvalues=".extensionId:id"
258 onclick="handleUninstallExtension(this)" 278 onclick="handleUninstallExtension(this)"
259 >Uninstall</button> 279 >Uninstall</button>
260 </div> 280 </div>
261 <dl> 281 <dl>
262 <dd>Id: <span jscontent="id">0000000000000000000000000000000000000 000</span></dd> 282 <dd>Id: <span jscontent="id">0000000000000000000000000000000000000 000</span></dd>
263 <dd> 283 <dd>
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 <!-- TODO(aa): Debug link --> 332 <!-- TODO(aa): Debug link -->
313 </tr> 333 </tr>
314 </tbody> 334 </tbody>
315 </table> 335 </table>
316 </div> 336 </div>
317 </div> 337 </div>
318 </div> 338 </div>
319 </div> 339 </div>
320 </body> 340 </body>
321 </html> 341 </html>
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extensions_ui.cc ('k') | chrome/chrome.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698