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 var localStrings = new LocalStrings(); | 5 var localStrings = new LocalStrings(); |
6 | 6 |
7 cr.define('diag', function() { | 7 cr.define('diag', function() { |
8 /** | 8 /** |
9 * Encapsulated handling of the diagnostics page. | 9 * Encapsulated handling of the diagnostics page. |
10 */ | 10 */ |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 IN_PROGRESS: 1, | 56 IN_PROGRESS: 1, |
57 FAILED: 2, | 57 FAILED: 2, |
58 SUCCEEDED: 3 | 58 SUCCEEDED: 3 |
59 }; | 59 }; |
60 | 60 |
61 /** | 61 /** |
62 * Image elements for icons. | 62 * Image elements for icons. |
63 */ | 63 */ |
64 DiagPage.FailIconElement = document.createElement('img'); | 64 DiagPage.FailIconElement = document.createElement('img'); |
65 DiagPage.TickIconElement = document.createElement('img'); | 65 DiagPage.TickIconElement = document.createElement('img'); |
66 DiagPage.FailIconElement.setAttribute('src', 'fail.png'); | 66 DiagPage.FailIconElement.setAttribute('src', 'chrome://diagnostics/fail.png'); |
67 DiagPage.TickIconElement.setAttribute('src', 'tick.png'); | 67 DiagPage.TickIconElement.setAttribute('src', 'chrome://diagnostics/tick.png'); |
68 | 68 |
69 DiagPage.prototype = { | 69 DiagPage.prototype = { |
70 /** | 70 /** |
71 * Perform initial setup. | 71 * Perform initial setup. |
72 */ | 72 */ |
73 initialize: function() { | 73 initialize: function() { |
74 // Reset the diag page state. | 74 // Reset the diag page state. |
75 this.reset_(); | 75 this.reset_(); |
76 | 76 |
77 // Register event handlers. | 77 // Register event handlers. |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 DiagPage: DiagPage | 326 DiagPage: DiagPage |
327 }; | 327 }; |
328 }); | 328 }); |
329 | 329 |
330 /** | 330 /** |
331 * Initialize the DiagPage upon DOM content loaded. | 331 * Initialize the DiagPage upon DOM content loaded. |
332 */ | 332 */ |
333 document.addEventListener('DOMContentLoaded', function() { | 333 document.addEventListener('DOMContentLoaded', function() { |
334 diag.DiagPage.getInstance().initialize(); | 334 diag.DiagPage.getInstance().initialize(); |
335 }); | 335 }); |
OLD | NEW |