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

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

Issue 1418293002: Devtools: Extensible mime typing, mime typing by file name (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add url function to mock project Created 5 years, 1 month 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
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/sources/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) 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 480 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 isDirty: function() 491 isDirty: function()
492 { 492 {
493 return typeof this._workingCopy !== "undefined" || typeof this._workingC opyGetter !== "undefined"; 493 return typeof this._workingCopy !== "undefined" || typeof this._workingC opyGetter !== "undefined";
494 }, 494 },
495 495
496 /** 496 /**
497 * @return {string} 497 * @return {string}
498 */ 498 */
499 extension: function() 499 extension: function()
500 { 500 {
501 var lastIndexOfDot = this._name.lastIndexOf("."); 501 return WebInspector.TextUtils.extension(this._name);
502 var extension = lastIndexOfDot !== -1 ? this._name.substr(lastIndexOfDot + 1) : "";
503 var indexOfQuestionMark = extension.indexOf("?");
504 if (indexOfQuestionMark !== -1)
505 extension = extension.substr(0, indexOfQuestionMark);
506 return extension;
507 }, 502 },
508 503
509 /** 504 /**
510 * @return {?string} 505 * @return {?string}
511 */ 506 */
512 content: function() 507 content: function()
513 { 508 {
514 return this._content; 509 return this._content;
515 }, 510 },
516 511
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
697 * @param {string} query 692 * @param {string} query
698 * @param {boolean} caseSensitive 693 * @param {boolean} caseSensitive
699 * @param {boolean} isRegex 694 * @param {boolean} isRegex
700 * @param {function(!Array.<!WebInspector.ContentProvider.SearchMatch>)} cal lback 695 * @param {function(!Array.<!WebInspector.ContentProvider.SearchMatch>)} cal lback
701 */ 696 */
702 searchInContent: function(query, caseSensitive, isRegex, callback) 697 searchInContent: function(query, caseSensitive, isRegex, callback)
703 { 698 {
704 callback([]); 699 callback([]);
705 } 700 }
706 } 701 }
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/sources/SourcesView.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698