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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/source_frame/SourceFrame.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 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 this.element.addEventListener("keydown", this._handleKeyDown.bind(this), fal se); 56 this.element.addEventListener("keydown", this._handleKeyDown.bind(this), fal se);
57 57
58 this._sourcePosition = new WebInspector.ToolbarText(); 58 this._sourcePosition = new WebInspector.ToolbarText();
59 59
60 /** 60 /**
61 * @type {?WebInspector.SearchableView} 61 * @type {?WebInspector.SearchableView}
62 */ 62 */
63 this._searchableView = null; 63 this._searchableView = null;
64 } 64 }
65 65
66 /** @enum {symbol} */
66 WebInspector.SourceFrame.Events = { 67 WebInspector.SourceFrame.Events = {
67 ScrollChanged: "ScrollChanged", 68 ScrollChanged: Symbol("ScrollChanged"),
68 SelectionChanged: "SelectionChanged", 69 SelectionChanged: Symbol("SelectionChanged"),
69 JumpHappened: "JumpHappened" 70 JumpHappened: Symbol("JumpHappened")
70 } 71 }
71 72
72 WebInspector.SourceFrame.prototype = { 73 WebInspector.SourceFrame.prototype = {
73 /** 74 /**
74 * @param {number} key 75 * @param {number} key
75 * @param {function():boolean} handler 76 * @param {function():boolean} handler
76 */ 77 */
77 addShortcut: function(key, handler) 78 addShortcut: function(key, handler)
78 { 79 {
79 this._shortcuts[key] = handler; 80 this._shortcuts[key] = handler;
(...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after
712 /** 713 /**
713 * @override 714 * @override
714 * @param {?WebInspector.TextRange} from 715 * @param {?WebInspector.TextRange} from
715 * @param {?WebInspector.TextRange} to 716 * @param {?WebInspector.TextRange} to
716 */ 717 */
717 onJumpToPosition: function(from, to) 718 onJumpToPosition: function(from, to)
718 { 719 {
719 this._sourceFrame.onJumpToPosition(from, to); 720 this._sourceFrame.onJumpToPosition(from, to);
720 } 721 }
721 } 722 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698