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

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

Issue 212623013: DevTools: Make SourcesView shortcut work when it's shown in drawer and move "save" shortcut into it (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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
« no previous file with comments | « Source/devtools/front_end/SourcesView.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 23 matching lines...) Expand all
34 WebInspector.UISourceCodeFrame = function(uiSourceCode) 34 WebInspector.UISourceCodeFrame = function(uiSourceCode)
35 { 35 {
36 this._uiSourceCode = uiSourceCode; 36 this._uiSourceCode = uiSourceCode;
37 WebInspector.SourceFrame.call(this, this._uiSourceCode); 37 WebInspector.SourceFrame.call(this, this._uiSourceCode);
38 WebInspector.settings.textEditorAutocompletion.addChangeListener(this._enabl eAutocompletionIfNeeded, this); 38 WebInspector.settings.textEditorAutocompletion.addChangeListener(this._enabl eAutocompletionIfNeeded, this);
39 this._enableAutocompletionIfNeeded(); 39 this._enableAutocompletionIfNeeded();
40 40
41 this._uiSourceCode.addEventListener(WebInspector.UISourceCode.Events.Working CopyChanged, this._onWorkingCopyChanged, this); 41 this._uiSourceCode.addEventListener(WebInspector.UISourceCode.Events.Working CopyChanged, this._onWorkingCopyChanged, this);
42 this._uiSourceCode.addEventListener(WebInspector.UISourceCode.Events.Working CopyCommitted, this._onWorkingCopyCommitted, this); 42 this._uiSourceCode.addEventListener(WebInspector.UISourceCode.Events.Working CopyCommitted, this._onWorkingCopyCommitted, this);
43 this._updateStyle(); 43 this._updateStyle();
44 this.addShortcut(WebInspector.KeyboardShortcut.makeKey("s", WebInspector.Key boardShortcut.Modifiers.CtrlOrMeta), this._commitEditing.bind(this));
45 } 44 }
46 45
47 WebInspector.UISourceCodeFrame.prototype = { 46 WebInspector.UISourceCodeFrame.prototype = {
48 _commitEditing: function()
49 {
50 this.commitEditing();
51 return true;
52 },
53
54 /** 47 /**
55 * @return {!WebInspector.UISourceCode} 48 * @return {!WebInspector.UISourceCode}
56 */ 49 */
57 uiSourceCode: function() 50 uiSourceCode: function()
58 { 51 {
59 return this._uiSourceCode; 52 return this._uiSourceCode;
60 }, 53 },
61 54
62 _enableAutocompletionIfNeeded: function() 55 _enableAutocompletionIfNeeded: function()
63 { 56 {
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 contextMenu.appendSeparator(); 174 contextMenu.appendSeparator();
182 }, 175 },
183 176
184 dispose: function() 177 dispose: function()
185 { 178 {
186 this.detach(); 179 this.detach();
187 }, 180 },
188 181
189 __proto__: WebInspector.SourceFrame.prototype 182 __proto__: WebInspector.SourceFrame.prototype
190 } 183 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/SourcesView.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698