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

Side by Side Diff: chrome/browser/resources/net_internals/http_throttling_view.js

Issue 7564029: Use javascript strict mode throughout a number of net-internals files. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix one more var Created 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 * This view displays information related to HTTP throttling. 6 * This view displays information related to HTTP throttling.
7 */ 7 */
8 var HttpThrottlingView = (function() {
9 'use strict';
8 10
9 var HttpThrottlingView = (function() {
10 // IDs for special HTML elements in http_throttling_view.html 11 // IDs for special HTML elements in http_throttling_view.html
11 const MAIN_BOX_ID = 'http-throttling-view-tab-content'; 12 var MAIN_BOX_ID = 'http-throttling-view-tab-content';
12 const ENABLE_CHECKBOX_ID = 'http-throttling-view-enable-checkbox'; 13 var ENABLE_CHECKBOX_ID = 'http-throttling-view-enable-checkbox';
13 14
14 // We inherit from DivView. 15 // We inherit from DivView.
15 var superClass = DivView; 16 var superClass = DivView;
16 17
18 /**
19 * @constructor
20 */
17 function HttpThrottlingView() { 21 function HttpThrottlingView() {
22 assertFirstConstructorCall(HttpThrottlingView);
23
18 // Call superclass's constructor. 24 // Call superclass's constructor.
19 superClass.call(this, MAIN_BOX_ID); 25 superClass.call(this, MAIN_BOX_ID);
20 26
21 this.enableCheckbox_ = $(ENABLE_CHECKBOX_ID); 27 this.enableCheckbox_ = $(ENABLE_CHECKBOX_ID);
22 this.enableCheckbox_.onclick = this.onEnableCheckboxClicked_.bind(this); 28 this.enableCheckbox_.onclick = this.onEnableCheckboxClicked_.bind(this);
23 29
24 g_browser.addHttpThrottlingObserver(this); 30 g_browser.addHttpThrottlingObserver(this);
25 } 31 }
26 32
27 cr.addSingletonGetter(HttpThrottlingView); 33 cr.addSingletonGetter(HttpThrottlingView);
(...skipping 13 matching lines...) Expand all
41 /** 47 /**
42 * Handler for the onclick event of the checkbox. 48 * Handler for the onclick event of the checkbox.
43 */ 49 */
44 onEnableCheckboxClicked_: function() { 50 onEnableCheckboxClicked_: function() {
45 g_browser.enableHttpThrottling(this.enableCheckbox_.checked); 51 g_browser.enableHttpThrottling(this.enableCheckbox_.checked);
46 } 52 }
47 }; 53 };
48 54
49 return HttpThrottlingView; 55 return HttpThrottlingView;
50 })(); 56 })();
OLDNEW
« no previous file with comments | « chrome/browser/resources/net_internals/http_cache_view.js ('k') | chrome/browser/resources/net_internals/import_view.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698