OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |