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

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

Issue 2602473003: Run tools/clang-format-js on chrome/browser/resources/net_internals (Closed)
Patch Set: drop dep Created 3 years, 11 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 (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 /** 5 /**
6 * Sets the width (in pixels) on a DOM node. 6 * Sets the width (in pixels) on a DOM node.
7 * @param {!HtmlNode} node The node whose width is being set. 7 * @param {!HtmlNode} node The node whose width is being set.
8 * @param {number} widthPx The width in pixels. 8 * @param {number} widthPx The width in pixels.
9 */ 9 */
10 function setNodeWidth(node, widthPx) { 10 function setNodeWidth(node, widthPx) {
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 return copy; 157 return copy;
158 } 158 }
159 159
160 /** 160 /**
161 * Helper to make sure singleton classes are not instantiated more than once. 161 * Helper to make sure singleton classes are not instantiated more than once.
162 * @param {Function} ctor The constructor function being checked. 162 * @param {Function} ctor The constructor function being checked.
163 */ 163 */
164 function assertFirstConstructorCall(ctor) { 164 function assertFirstConstructorCall(ctor) {
165 // This is the variable which is set by cr.addSingletonGetter(). 165 // This is the variable which is set by cr.addSingletonGetter().
166 if (ctor.hasCreateFirstInstance_) { 166 if (ctor.hasCreateFirstInstance_) {
167 throw Error('The class ' + ctor.name + ' is a singleton, and should ' + 167 throw Error(
168 'only be accessed using ' + ctor.name + '.getInstance().'); 168 'The class ' + ctor.name + ' is a singleton, and should ' +
169 'only be accessed using ' + ctor.name + '.getInstance().');
169 } 170 }
170 ctor.hasCreateFirstInstance_ = true; 171 ctor.hasCreateFirstInstance_ = true;
171 } 172 }
172 173
173 function hasTouchScreen() { 174 function hasTouchScreen() {
174 return 'ontouchstart' in window; 175 return 'ontouchstart' in window;
175 } 176 }
OLDNEW
« no previous file with comments | « chrome/browser/resources/net_internals/top_mid_bottom_view.js ('k') | chrome/browser/resources/net_internals/view.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698