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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/snippets/ScriptSnippetModel.js

Issue 1523193002: DevTools: merge UISourceCode's parentPath, name, originURL and uri. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebaselined Created 5 years 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) 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 * * 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 572 matching lines...) Expand 10 before | Expand all | Expand 10 after
583 } 583 }
584 584
585 /** 585 /**
586 * @constructor 586 * @constructor
587 * @extends {WebInspector.ContentProviderBasedProject} 587 * @extends {WebInspector.ContentProviderBasedProject}
588 * @param {!WebInspector.Workspace} workspace 588 * @param {!WebInspector.Workspace} workspace
589 * @param {!WebInspector.ScriptSnippetModel} model 589 * @param {!WebInspector.ScriptSnippetModel} model
590 */ 590 */
591 WebInspector.SnippetsProject = function(workspace, model) 591 WebInspector.SnippetsProject = function(workspace, model)
592 { 592 {
593 WebInspector.ContentProviderBasedProject.call(this, workspace, "snippets:", WebInspector.projectTypes.Snippets, "", ""); 593 WebInspector.ContentProviderBasedProject.call(this, workspace, "snippets:", WebInspector.projectTypes.Snippets, "");
594 this._model = model; 594 this._model = model;
595 } 595 }
596 596
597 WebInspector.SnippetsProject.prototype = { 597 WebInspector.SnippetsProject.prototype = {
598 /** 598 /**
599 * @param {string} name 599 * @param {string} name
600 * @param {!WebInspector.ContentProvider} contentProvider 600 * @param {!WebInspector.ContentProvider} contentProvider
601 * @return {!WebInspector.UISourceCode} 601 * @return {!WebInspector.UISourceCode}
602 */ 602 */
603 addSnippet: function(name, contentProvider) 603 addSnippet: function(name, contentProvider)
604 { 604 {
605 return this.addContentProvider("", name, name, contentProvider); 605 return this.addContentProvider(name, contentProvider);
606 }, 606 },
607 607
608 /** 608 /**
609 * @override 609 * @override
610 * @return {boolean} 610 * @return {boolean}
611 */ 611 */
612 canSetFileContent: function() 612 canSetFileContent: function()
613 { 613 {
614 return true; 614 return true;
615 }, 615 },
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
667 this._model.deleteScriptSnippet(path); 667 this._model.deleteScriptSnippet(path);
668 }, 668 },
669 669
670 __proto__: WebInspector.ContentProviderBasedProject.prototype 670 __proto__: WebInspector.ContentProviderBasedProject.prototype
671 } 671 }
672 672
673 /** 673 /**
674 * @type {!WebInspector.ScriptSnippetModel} 674 * @type {!WebInspector.ScriptSnippetModel}
675 */ 675 */
676 WebInspector.scriptSnippetModel = new WebInspector.ScriptSnippetModel(WebInspect or.workspace); 676 WebInspector.scriptSnippetModel = new WebInspector.ScriptSnippetModel(WebInspect or.workspace);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698