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

Side by Side Diff: tools/memory_inspector/chrome_app/template/main_window.js

Issue 1150173003: Fix some JS style nits. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 5 years, 6 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 'use strict'; 5 'use strict';
6 6
7 /** 7 /**
8 * Singleton object representing the main window of the Memory Inspector Chrome 8 * Singleton object representing the main window of the Memory Inspector Chrome
9 * App. 9 * App.
10 * @constructor 10 * @constructor
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 MemoryInspectorWindow.prototype.storeSettings_ = function() { 307 MemoryInspectorWindow.prototype.storeSettings_ = function() {
308 var settings = {}; 308 var settings = {};
309 settings['terminal_visible'] = this.terminalVisible_; 309 settings['terminal_visible'] = this.terminalVisible_;
310 chrome.storage.local.set(settings); 310 chrome.storage.local.set(settings);
311 }; 311 };
312 312
313 /** 313 /**
314 * Listener called when main window settings were retrieved from local storage. 314 * Listener called when main window settings were retrieved from local storage.
315 * It saves them and finally shows the app window. 315 * It saves them and finally shows the app window.
316 * @private 316 * @private
317 * @param {Object.<string, *>} settings The retrieved settings. 317 * @param {Object<string, *>} settings The retrieved settings.
318 */ 318 */
319 MemoryInspectorWindow.prototype.onSettingsRetrieved_ = function(settings) { 319 MemoryInspectorWindow.prototype.onSettingsRetrieved_ = function(settings) {
320 if (chrome.runtime.lastError === undefined && settings['terminal_visible']) { 320 if (chrome.runtime.lastError === undefined && settings['terminal_visible']) {
321 // Skip CSS animations by temporarily hiding everything. 321 // Skip CSS animations by temporarily hiding everything.
322 document.body.style.display = 'none'; 322 document.body.style.display = 'none';
323 this.showTerminal_(); 323 this.showTerminal_();
324 document.body.style.display = 'block'; 324 document.body.style.display = 'block';
325 } 325 }
326 326
327 // We are finally ready to show the window. 327 // We are finally ready to show the window.
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 397
398 window.addEventListener('load', function() { 398 window.addEventListener('load', function() {
399 // Create the singleton MemoryInspectorWindow instance and initialize it. 399 // Create the singleton MemoryInspectorWindow instance and initialize it.
400 var mainWindow = new MemoryInspectorWindow(); 400 var mainWindow = new MemoryInspectorWindow();
401 mainWindow.initialize(); 401 mainWindow.initialize();
402 402
403 // Make the instance global for debugging purposes. 403 // Make the instance global for debugging purposes.
404 window.mainWindow = mainWindow; 404 window.mainWindow = mainWindow;
405 }); 405 });
406 406
OLDNEW
« no previous file with comments | « tools/deep_memory_profiler/visualizer/static/utility.js ('k') | ui/accessibility/extensions/caretbrowsing/caretbrowsing.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698