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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/emulation/SensorsView.js

Issue 2604883002: DevTools: namespace globals (Closed)
Patch Set: address CL feedback 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) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 * @unrestricted 5 * @unrestricted
6 */ 6 */
7 Emulation.SensorsView = class extends UI.VBox { 7 Emulation.SensorsView = class extends UI.VBox {
8 constructor() { 8 constructor() {
9 super(true); 9 super(true);
10 this.registerRequiredCSS('emulation/sensors.css'); 10 this.registerRequiredCSS('emulation/sensors.css');
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 this._alphaSetter(String(deviceOrientation.alpha)); 317 this._alphaSetter(String(deviceOrientation.alpha));
318 318
319 this._betaElement = createElement('input'); 319 this._betaElement = createElement('input');
320 this._betaSetter = this._createAxisInput(cellElement, this._betaElement, Com mon.UIString('\u03B2 (beta)')); 320 this._betaSetter = this._createAxisInput(cellElement, this._betaElement, Com mon.UIString('\u03B2 (beta)'));
321 this._betaSetter(String(deviceOrientation.beta)); 321 this._betaSetter(String(deviceOrientation.beta));
322 322
323 this._gammaElement = createElement('input'); 323 this._gammaElement = createElement('input');
324 this._gammaSetter = this._createAxisInput(cellElement, this._gammaElement, C ommon.UIString('\u03B3 (gamma)')); 324 this._gammaSetter = this._createAxisInput(cellElement, this._gammaElement, C ommon.UIString('\u03B3 (gamma)'));
325 this._gammaSetter(String(deviceOrientation.gamma)); 325 this._gammaSetter(String(deviceOrientation.gamma));
326 326
327 cellElement.appendChild(createTextButton( 327 cellElement.appendChild(UI.createTextButton(
328 Common.UIString('Reset'), this._resetDeviceOrientation.bind(this), 'orie ntation-reset-button')); 328 Common.UIString('Reset'), this._resetDeviceOrientation.bind(this), 'orie ntation-reset-button'));
329 return fieldsetElement; 329 return fieldsetElement;
330 } 330 }
331 331
332 /** 332 /**
333 * @param {!Emulation.DeviceOrientation} deviceOrientation 333 * @param {!Emulation.DeviceOrientation} deviceOrientation
334 * @param {boolean} animate 334 * @param {boolean} animate
335 */ 335 */
336 _setBoxOrientation(deviceOrientation, animate) { 336 _setBoxOrientation(deviceOrientation, animate) {
337 if (animate) 337 if (animate)
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 * @param {string} actionId 497 * @param {string} actionId
498 * @return {boolean} 498 * @return {boolean}
499 */ 499 */
500 handleAction(context, actionId) { 500 handleAction(context, actionId) {
501 UI.viewManager.showView('sensors'); 501 UI.viewManager.showView('sensors');
502 return true; 502 return true;
503 } 503 }
504 }; 504 };
505 505
506 Emulation.SensorsView.ShiftDragOrientationSpeed = 16; 506 Emulation.SensorsView.ShiftDragOrientationSpeed = 16;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698