| Index: third_party/WebKit/Source/devtools/front_end/common/ContentProvider.js
|
| diff --git a/third_party/WebKit/Source/devtools/front_end/common/ContentProvider.js b/third_party/WebKit/Source/devtools/front_end/common/ContentProvider.js
|
| index bfa5efe4fbf79a40df18770275e5da4ba97c49f3..5b4df3ea9fcb5525d000eaf259bb3cd12cc0fcc1 100644
|
| --- a/third_party/WebKit/Source/devtools/front_end/common/ContentProvider.js
|
| +++ b/third_party/WebKit/Source/devtools/front_end/common/ContentProvider.js
|
| @@ -30,16 +30,16 @@
|
| /**
|
| * @interface
|
| */
|
| -WebInspector.ContentProvider = function() {};
|
| +Common.ContentProvider = function() {};
|
|
|
| -WebInspector.ContentProvider.prototype = {
|
| +Common.ContentProvider.prototype = {
|
| /**
|
| * @return {string}
|
| */
|
| contentURL: function() {},
|
|
|
| /**
|
| - * @return {!WebInspector.ResourceType}
|
| + * @return {!Common.ResourceType}
|
| */
|
| contentType: function() {},
|
|
|
| @@ -52,7 +52,7 @@ WebInspector.ContentProvider.prototype = {
|
| * @param {string} query
|
| * @param {boolean} caseSensitive
|
| * @param {boolean} isRegex
|
| - * @param {function(!Array.<!WebInspector.ContentProvider.SearchMatch>)} callback
|
| + * @param {function(!Array.<!Common.ContentProvider.SearchMatch>)} callback
|
| */
|
| searchInContent: function(query, caseSensitive, isRegex, callback) {}
|
| };
|
| @@ -60,7 +60,7 @@ WebInspector.ContentProvider.prototype = {
|
| /**
|
| * @unrestricted
|
| */
|
| -WebInspector.ContentProvider.SearchMatch = class {
|
| +Common.ContentProvider.SearchMatch = class {
|
| /**
|
| * @param {number} lineNumber
|
| * @param {string} lineContent
|
| @@ -76,18 +76,18 @@ WebInspector.ContentProvider.SearchMatch = class {
|
| * @param {string} query
|
| * @param {boolean} caseSensitive
|
| * @param {boolean} isRegex
|
| - * @return {!Array.<!WebInspector.ContentProvider.SearchMatch>}
|
| + * @return {!Array.<!Common.ContentProvider.SearchMatch>}
|
| */
|
| -WebInspector.ContentProvider.performSearchInContent = function(content, query, caseSensitive, isRegex) {
|
| +Common.ContentProvider.performSearchInContent = function(content, query, caseSensitive, isRegex) {
|
| var regex = createSearchRegex(query, caseSensitive, isRegex);
|
|
|
| - var text = new WebInspector.Text(content);
|
| + var text = new Common.Text(content);
|
| var result = [];
|
| for (var i = 0; i < text.lineCount(); ++i) {
|
| var lineContent = text.lineAt(i);
|
| regex.lastIndex = 0;
|
| if (regex.exec(lineContent))
|
| - result.push(new WebInspector.ContentProvider.SearchMatch(i, lineContent));
|
| + result.push(new Common.ContentProvider.SearchMatch(i, lineContent));
|
| }
|
| return result;
|
| };
|
| @@ -99,7 +99,7 @@ WebInspector.ContentProvider.performSearchInContent = function(content, query, c
|
| * @param {?string=} charset
|
| * @return {?string}
|
| */
|
| -WebInspector.ContentProvider.contentAsDataURL = function(content, mimeType, contentEncoded, charset) {
|
| +Common.ContentProvider.contentAsDataURL = function(content, mimeType, contentEncoded, charset) {
|
| const maxDataUrlSize = 1024 * 1024;
|
| if (content === null || content.length > maxDataUrlSize)
|
| return null;
|
|
|