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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/ui/ResizerWidget.js

Issue 2261933002: DevTools: Use JS symbols instead of strings for eligible events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 * @constructor 6 * @constructor
7 * @extends {WebInspector.Object} 7 * @extends {WebInspector.Object}
8 */ 8 */
9 WebInspector.ResizerWidget = function() 9 WebInspector.ResizerWidget = function()
10 { 10 {
11 WebInspector.Object.call(this); 11 WebInspector.Object.call(this);
12 12
13 this._isEnabled = true; 13 this._isEnabled = true;
14 this._elements = []; 14 this._elements = [];
15 this._installDragOnMouseDownBound = this._installDragOnMouseDown.bind(this); 15 this._installDragOnMouseDownBound = this._installDragOnMouseDown.bind(this);
16 this._cursor = "nwse-resize"; 16 this._cursor = "nwse-resize";
17 }; 17 };
18 18
19 /** @enum {symbol} */
19 WebInspector.ResizerWidget.Events = { 20 WebInspector.ResizerWidget.Events = {
20 ResizeStart: "ResizeStart", 21 ResizeStart: Symbol("ResizeStart"),
21 ResizeUpdate: "ResizeUpdate", 22 ResizeUpdate: Symbol("ResizeUpdate"),
22 ResizeEnd: "ResizeEnd" 23 ResizeEnd: Symbol("ResizeEnd")
23 }; 24 };
24 25
25 WebInspector.ResizerWidget.prototype = { 26 WebInspector.ResizerWidget.prototype = {
26 /** 27 /**
27 * @return {boolean} 28 * @return {boolean}
28 */ 29 */
29 isEnabled: function() 30 isEnabled: function()
30 { 31 {
31 return this._isEnabled; 32 return this._isEnabled;
32 }, 33 },
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 sendDragMove: function(startX, currentX, startY, currentY, shiftKey) 243 sendDragMove: function(startX, currentX, startY, currentY, shiftKey)
243 { 244 {
244 if (this._isVertical) 245 if (this._isVertical)
245 this.dispatchEventToListeners(WebInspector.ResizerWidget.Events.Resi zeUpdate, { startPosition: startY, currentPosition: currentY, shiftKey: shiftKey }); 246 this.dispatchEventToListeners(WebInspector.ResizerWidget.Events.Resi zeUpdate, { startPosition: startY, currentPosition: currentY, shiftKey: shiftKey });
246 else 247 else
247 this.dispatchEventToListeners(WebInspector.ResizerWidget.Events.Resi zeUpdate, { startPosition: startX, currentPosition: currentX, shiftKey: shiftKey }); 248 this.dispatchEventToListeners(WebInspector.ResizerWidget.Events.Resi zeUpdate, { startPosition: startX, currentPosition: currentX, shiftKey: shiftKey });
248 }, 249 },
249 250
250 __proto__: WebInspector.ResizerWidget.prototype 251 __proto__: WebInspector.ResizerWidget.prototype
251 }; 252 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698