| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 namespace blink { | 48 namespace blink { |
| 49 | 49 |
| 50 class Range; | 50 class Range; |
| 51 class WebLocalFrameImpl; | 51 class WebLocalFrameImpl; |
| 52 | 52 |
| 53 template <typename T> class WebVector; | 53 template <typename T> class WebVector; |
| 54 | 54 |
| 55 class WEB_EXPORT TextFinder final : public GarbageCollectedFinalized<TextFinder>
{ | 55 class WEB_EXPORT TextFinder final : public GarbageCollectedFinalized<TextFinder>
{ |
| 56 WTF_MAKE_NONCOPYABLE(TextFinder); | 56 WTF_MAKE_NONCOPYABLE(TextFinder); |
| 57 public: | 57 public: |
| 58 static RawPtr<TextFinder> create(WebLocalFrameImpl& ownerFrame); | 58 static TextFinder* create(WebLocalFrameImpl& ownerFrame); |
| 59 | 59 |
| 60 bool find( | 60 bool find( |
| 61 int identifier, const WebString& searchText, const WebFindOptions&, | 61 int identifier, const WebString& searchText, const WebFindOptions&, |
| 62 bool wrapWithinFrame, WebRect* selectionRect, bool* activeNow = nullptr)
; | 62 bool wrapWithinFrame, WebRect* selectionRect, bool* activeNow = nullptr)
; |
| 63 void stopFindingAndClearSelection(); | 63 void stopFindingAndClearSelection(); |
| 64 void scopeStringMatches( | 64 void scopeStringMatches( |
| 65 int identifier, const WebString& searchText, const WebFindOptions&, | 65 int identifier, const WebString& searchText, const WebFindOptions&, |
| 66 bool reset); | 66 bool reset); |
| 67 void cancelPendingScopingEffort(); | 67 void cancelPendingScopingEffort(); |
| 68 void increaseMatchCount(int identifier, int count); | 68 void increaseMatchCount(int identifier, int count); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 87 | 87 |
| 88 int totalMatchCount() const { return m_totalMatchCount; } | 88 int totalMatchCount() const { return m_totalMatchCount; } |
| 89 bool scopingInProgress() const { return m_scopingInProgress; } | 89 bool scopingInProgress() const { return m_scopingInProgress; } |
| 90 void increaseMarkerVersion() { ++m_findMatchMarkersVersion; } | 90 void increaseMarkerVersion() { ++m_findMatchMarkersVersion; } |
| 91 | 91 |
| 92 ~TextFinder(); | 92 ~TextFinder(); |
| 93 | 93 |
| 94 class FindMatch { | 94 class FindMatch { |
| 95 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); | 95 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); |
| 96 public: | 96 public: |
| 97 FindMatch(RawPtr<Range>, int ordinal); | 97 FindMatch(Range*, int ordinal); |
| 98 | 98 |
| 99 DECLARE_TRACE(); | 99 DECLARE_TRACE(); |
| 100 | 100 |
| 101 Member<Range> m_range; | 101 Member<Range> m_range; |
| 102 | 102 |
| 103 // 1-based index within this frame. | 103 // 1-based index within this frame. |
| 104 int m_ordinal; | 104 int m_ordinal; |
| 105 | 105 |
| 106 // In find-in-page coordinates. | 106 // In find-in-page coordinates. |
| 107 // Lazily calculated by updateFindMatchRects. | 107 // Lazily calculated by updateFindMatchRects. |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 // Determines if the rects in the find-in-page matches cache of this frame | 282 // Determines if the rects in the find-in-page matches cache of this frame |
| 283 // are invalid and should be recomputed. | 283 // are invalid and should be recomputed. |
| 284 bool m_findMatchRectsAreValid; | 284 bool m_findMatchRectsAreValid; |
| 285 }; | 285 }; |
| 286 | 286 |
| 287 } // namespace blink | 287 } // namespace blink |
| 288 | 288 |
| 289 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::TextFinder::FindMatch); | 289 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::TextFinder::FindMatch); |
| 290 | 290 |
| 291 #endif // TextFinder_h | 291 #endif // TextFinder_h |
| OLD | NEW |