| OLD | NEW |
| 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 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * | 10 * |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 22 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 */ | 27 */ |
| 28 | 28 |
| 29 #ifndef ContentSearchUtils_h | 29 #ifndef ContentSearchUtils_h |
| 30 #define ContentSearchUtils_h | 30 #define ContentSearchUtils_h |
| 31 | 31 |
| 32 #if ENABLE(INSPECTOR) | |
| 33 | 32 |
| 34 #include "InspectorTypeBuilder.h" | 33 #include "InspectorTypeBuilder.h" |
| 35 #include <wtf/Vector.h> | 34 #include <wtf/Vector.h> |
| 36 #include <wtf/text/TextPosition.h> | 35 #include <wtf/text/TextPosition.h> |
| 37 #include <wtf/text/WTFString.h> | 36 #include <wtf/text/WTFString.h> |
| 38 | 37 |
| 39 namespace WebCore { | 38 namespace WebCore { |
| 40 | 39 |
| 41 class InspectorArray; | 40 class InspectorArray; |
| 42 class RegularExpression; | 41 class RegularExpression; |
| 43 | 42 |
| 44 namespace ContentSearchUtils { | 43 namespace ContentSearchUtils { |
| 45 | 44 |
| 46 RegularExpression createSearchRegex(const String& query, bool caseSensitive, boo
l isRegex); | 45 RegularExpression createSearchRegex(const String& query, bool caseSensitive, boo
l isRegex); |
| 47 int countRegularExpressionMatches(const RegularExpression&, const String&); | 46 int countRegularExpressionMatches(const RegularExpression&, const String&); |
| 48 PassRefPtr<TypeBuilder::Array<TypeBuilder::Page::SearchMatch> > searchInTextByLi
nes(const String& text, const String& query, const bool caseSensitive, const boo
l isRegex); | 47 PassRefPtr<TypeBuilder::Array<TypeBuilder::Page::SearchMatch> > searchInTextByLi
nes(const String& text, const String& query, const bool caseSensitive, const boo
l isRegex); |
| 49 TextPosition textPositionFromOffset(size_t offset, const Vector<size_t>& lineEnd
ings); | 48 TextPosition textPositionFromOffset(size_t offset, const Vector<size_t>& lineEnd
ings); |
| 50 PassOwnPtr<Vector<size_t> > lineEndings(const String&); | 49 PassOwnPtr<Vector<size_t> > lineEndings(const String&); |
| 51 | 50 |
| 52 String findSourceURL(const String& content); | 51 String findSourceURL(const String& content); |
| 53 String findSourceMapURL(const String& content); | 52 String findSourceMapURL(const String& content); |
| 54 | 53 |
| 55 } // namespace ContentSearchUtils | 54 } // namespace ContentSearchUtils |
| 56 } // namespace WebCore | 55 } // namespace WebCore |
| 57 | 56 |
| 58 #endif // ENABLE(INSPECTOR) | |
| 59 | 57 |
| 60 #endif // !defined(ContentSearchUtils_h) | 58 #endif // !defined(ContentSearchUtils_h) |
| OLD | NEW |