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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/source_frame/SourceFrame.js

Issue 2349343002: DevTools: introduce persistence/ module (Closed)
Patch Set: DevTools: add persistence/ module Created 4 years, 3 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 WebInspector.SimpleView.call(this, WebInspector.UIString("Source")); 42 WebInspector.SimpleView.call(this, WebInspector.UIString("Source"));
43 43
44 this._url = url; 44 this._url = url;
45 this._lazyContent = lazyContent; 45 this._lazyContent = lazyContent;
46 46
47 this._textEditor = new WebInspector.SourcesTextEditor(this); 47 this._textEditor = new WebInspector.SourcesTextEditor(this);
48 48
49 this._currentSearchResultIndex = -1; 49 this._currentSearchResultIndex = -1;
50 this._searchResults = []; 50 this._searchResults = [];
51 51
52 this._textEditor.setReadOnly(!this.canEditSource());
dgozman 2016/09/22 19:55:53 Leave it.
lushnikov 2016/09/23 21:56:13 Done.
53
54 this._shortcuts = {}; 52 this._shortcuts = {};
55 this.element.addEventListener("keydown", this._handleKeyDown.bind(this), fal se); 53 this.element.addEventListener("keydown", this._handleKeyDown.bind(this), fal se);
56 54
57 this._sourcePosition = new WebInspector.ToolbarText(); 55 this._sourcePosition = new WebInspector.ToolbarText();
58 56
59 /** 57 /**
60 * @type {?WebInspector.SearchableView} 58 * @type {?WebInspector.SearchableView}
61 */ 59 */
62 this._searchableView = null; 60 this._searchableView = null;
63 } 61 }
(...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after
651 _handleKeyDown: function(e) 649 _handleKeyDown: function(e)
652 { 650 {
653 var shortcutKey = WebInspector.KeyboardShortcut.makeKeyFromEvent(e); 651 var shortcutKey = WebInspector.KeyboardShortcut.makeKeyFromEvent(e);
654 var handler = this._shortcuts[shortcutKey]; 652 var handler = this._shortcuts[shortcutKey];
655 if (handler && handler()) 653 if (handler && handler())
656 e.consume(true); 654 e.consume(true);
657 }, 655 },
658 656
659 __proto__: WebInspector.SimpleView.prototype 657 __proto__: WebInspector.SimpleView.prototype
660 } 658 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698