| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 /** | 4 /** |
| 5 * @implements {Common.ContentProvider} | 5 * @implements {Common.ContentProvider} |
| 6 * @unrestricted | 6 * @unrestricted |
| 7 */ | 7 */ |
| 8 SDK.CSSStyleSheetHeader = class { | 8 SDK.CSSStyleSheetHeader = class { |
| 9 /** | 9 /** |
| 10 * @param {!SDK.CSSModel} cssModel | 10 * @param {!SDK.CSSModel} cssModel |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 } | 56 } |
| 57 | 57 |
| 58 /** | 58 /** |
| 59 * @return {!SDK.CSSModel} | 59 * @return {!SDK.CSSModel} |
| 60 */ | 60 */ |
| 61 cssModel() { | 61 cssModel() { |
| 62 return this._cssModel; | 62 return this._cssModel; |
| 63 } | 63 } |
| 64 | 64 |
| 65 /** | 65 /** |
| 66 * @return {boolean} |
| 67 */ |
| 68 isAnonymousInlineStyleSheet() { |
| 69 return !this.resourceURL() && !this._cssModel.sourceMapForHeader(this); |
| 70 } |
| 71 |
| 72 /** |
| 66 * @return {string} | 73 * @return {string} |
| 67 */ | 74 */ |
| 68 resourceURL() { | 75 resourceURL() { |
| 69 return this.isViaInspector() ? this._viaInspectorResourceURL() : this.source
URL; | 76 return this.isViaInspector() ? this._viaInspectorResourceURL() : this.source
URL; |
| 70 } | 77 } |
| 71 | 78 |
| 72 /** | 79 /** |
| 73 * @return {string} | 80 * @return {string} |
| 74 */ | 81 */ |
| 75 _viaInspectorResourceURL() { | 82 _viaInspectorResourceURL() { |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 */ | 205 */ |
| 199 function performSearch(content) { | 206 function performSearch(content) { |
| 200 var searchResults = | 207 var searchResults = |
| 201 content ? Common.ContentProvider.performSearchInContent(content, query
, caseSensitive, isRegex) : []; | 208 content ? Common.ContentProvider.performSearchInContent(content, query
, caseSensitive, isRegex) : []; |
| 202 callback(searchResults); | 209 callback(searchResults); |
| 203 } | 210 } |
| 204 | 211 |
| 205 this.requestContent().then(performSearch); | 212 this.requestContent().then(performSearch); |
| 206 } | 213 } |
| 207 }; | 214 }; |
| OLD | NEW |