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

Side by Side Diff: Source/devtools/front_end/workspace/UISourceCode.js

Issue 659433002: DevTools: Fix unsaved committed changes UI to match saved state when saving with file manager. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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/sources/UISourceCodeFrame.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) 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 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 { 356 {
357 WebInspector.fileManager.save(this._url, /** @type {string} */ (content) , forceSaveAs, callback.bind(this)); 357 WebInspector.fileManager.save(this._url, /** @type {string} */ (content) , forceSaveAs, callback.bind(this));
358 WebInspector.fileManager.close(this._url); 358 WebInspector.fileManager.close(this._url);
359 359
360 /** 360 /**
361 * @param {boolean} accepted 361 * @param {boolean} accepted
362 * @this {WebInspector.UISourceCode} 362 * @this {WebInspector.UISourceCode}
363 */ 363 */
364 function callback(accepted) 364 function callback(accepted)
365 { 365 {
366 if (!accepted) 366 this._savedWithFileManager = accepted;
367 return; 367 if (accepted)
368 this._savedWithFileManager = true; 368 this._hasCommittedChanges = false;
369 this.dispatchEventToListeners(WebInspector.UISourceCode.Events.Saved StateUpdated); 369 this.dispatchEventToListeners(WebInspector.UISourceCode.Events.Saved StateUpdated);
370 } 370 }
371 }, 371 },
372 372
373 /** 373 /**
374 * @param {boolean} forceSaveAs 374 * @param {boolean} forceSaveAs
375 */ 375 */
376 save: function(forceSaveAs) 376 save: function(forceSaveAs)
377 { 377 {
378 if (this.project().type() === WebInspector.projectTypes.FileSystem || th is.project().type() === WebInspector.projectTypes.Snippets) { 378 if (this.project().type() === WebInspector.projectTypes.FileSystem || th is.project().type() === WebInspector.projectTypes.Snippets) {
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
702 * @param {string} query 702 * @param {string} query
703 * @param {boolean} caseSensitive 703 * @param {boolean} caseSensitive
704 * @param {boolean} isRegex 704 * @param {boolean} isRegex
705 * @param {function(!Array.<!WebInspector.ContentProvider.SearchMatch>)} cal lback 705 * @param {function(!Array.<!WebInspector.ContentProvider.SearchMatch>)} cal lback
706 */ 706 */
707 searchInContent: function(query, caseSensitive, isRegex, callback) 707 searchInContent: function(query, caseSensitive, isRegex, callback)
708 { 708 {
709 callback([]); 709 callback([]);
710 } 710 }
711 } 711 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/sources/UISourceCodeFrame.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698