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

Side by Side Diff: Source/devtools/front_end/TabbedEditorContainer.js

Issue 23474010: DevTools: "Jump between editing locations" experiment (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebaseline this patch Created 6 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 | Annotate | Revision Log
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 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 10 *
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 176
177 var tabId = this._tabIds.get(uiSourceCode) || this._appendFileTab(uiSour ceCode, userGesture); 177 var tabId = this._tabIds.get(uiSourceCode) || this._appendFileTab(uiSour ceCode, userGesture);
178 178
179 this._tabbedPane.selectTab(tabId, userGesture); 179 this._tabbedPane.selectTab(tabId, userGesture);
180 if (userGesture) 180 if (userGesture)
181 this._editorSelectedByUserAction(); 181 this._editorSelectedByUserAction();
182 182
183 this._currentView = this.visibleView; 183 this._currentView = this.visibleView;
184 this._addScrollAndSelectionListeners(); 184 this._addScrollAndSelectionListeners();
185 185
186 this.dispatchEventToListeners(WebInspector.TabbedEditorContainer.Events. EditorSelected, this._currentFile); 186 var eventData = { currentFile: this._currentFile, userGesture: userGestu re };
187 this.dispatchEventToListeners(WebInspector.TabbedEditorContainer.Events. EditorSelected, eventData);
187 }, 188 },
188 189
189 /** 190 /**
190 * @param {!WebInspector.UISourceCode} uiSourceCode 191 * @param {!WebInspector.UISourceCode} uiSourceCode
191 * @return {string} 192 * @return {string}
192 */ 193 */
193 _titleForFile: function(uiSourceCode) 194 _titleForFile: function(uiSourceCode)
194 { 195 {
195 var maxDisplayNameLength = 30; 196 var maxDisplayNameLength = 30;
196 var title = uiSourceCode.displayName(true).trimMiddle(maxDisplayNameLeng th); 197 var title = uiSourceCode.displayName(true).trimMiddle(maxDisplayNameLeng th);
(...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after
712 WebInspector.EditorContainerTabDelegate.prototype = { 713 WebInspector.EditorContainerTabDelegate.prototype = {
713 /** 714 /**
714 * @param {!WebInspector.TabbedPane} tabbedPane 715 * @param {!WebInspector.TabbedPane} tabbedPane
715 * @param {!Array.<string>} ids 716 * @param {!Array.<string>} ids
716 */ 717 */
717 closeTabs: function(tabbedPane, ids) 718 closeTabs: function(tabbedPane, ids)
718 { 719 {
719 this._editorContainer._closeTabs(ids); 720 this._editorContainer._closeTabs(ids);
720 } 721 }
721 } 722 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/SourcesPanelDescriptor.js ('k') | Source/devtools/front_end/TextEditor.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698