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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 #include "platform/Timer.h" | 44 #include "platform/Timer.h" |
45 #include "public/platform/WebVector.h" | 45 #include "public/platform/WebVector.h" |
46 #include "public/web/WebFindOptions.h" | 46 #include "public/web/WebFindOptions.h" |
47 #include "public/web/WebFrameClient.h" | 47 #include "public/web/WebFrameClient.h" |
48 #include "public/web/WebViewClient.h" | 48 #include "public/web/WebViewClient.h" |
49 #include "web/FindInPageCoordinates.h" | 49 #include "web/FindInPageCoordinates.h" |
50 #include "web/WebLocalFrameImpl.h" | 50 #include "web/WebLocalFrameImpl.h" |
51 #include "web/WebViewImpl.h" | 51 #include "web/WebViewImpl.h" |
52 #include "wtf/CurrentTime.h" | 52 #include "wtf/CurrentTime.h" |
53 | 53 |
54 using namespace blink; | |
55 | |
56 namespace blink { | 54 namespace blink { |
57 | 55 |
58 TextFinder::FindMatch::FindMatch(PassRefPtrWillBeRawPtr<Range> range, int ordina
l) | 56 TextFinder::FindMatch::FindMatch(PassRefPtrWillBeRawPtr<Range> range, int ordina
l) |
59 : m_range(range) | 57 : m_range(range) |
60 , m_ordinal(ordinal) | 58 , m_ordinal(ordinal) |
61 { | 59 { |
62 } | 60 } |
63 | 61 |
64 void TextFinder::FindMatch::trace(blink::Visitor* visitor) | 62 void TextFinder::FindMatch::trace(Visitor* visitor) |
65 { | 63 { |
66 visitor->trace(m_range); | 64 visitor->trace(m_range); |
67 } | 65 } |
68 | 66 |
69 class TextFinder::DeferredScopeStringMatches { | 67 class TextFinder::DeferredScopeStringMatches { |
70 public: | 68 public: |
71 DeferredScopeStringMatches(TextFinder* textFinder, int identifier, const Web
String& searchText, const WebFindOptions& options, bool reset) | 69 DeferredScopeStringMatches(TextFinder* textFinder, int identifier, const Web
String& searchText, const WebFindOptions& options, bool reset) |
72 : m_timer(this, &DeferredScopeStringMatches::doTimeout) | 70 : m_timer(this, &DeferredScopeStringMatches::doTimeout) |
73 , m_textFinder(textFinder) | 71 , m_textFinder(textFinder) |
74 , m_identifier(identifier) | 72 , m_identifier(identifier) |
(...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
730 if (!m_framesScopingCount) | 728 if (!m_framesScopingCount) |
731 m_ownerFrame.increaseMatchCount(0, identifier); | 729 m_ownerFrame.increaseMatchCount(0, identifier); |
732 } | 730 } |
733 | 731 |
734 int TextFinder::ordinalOfFirstMatch() const | 732 int TextFinder::ordinalOfFirstMatch() const |
735 { | 733 { |
736 return ordinalOfFirstMatchForFrame(&m_ownerFrame); | 734 return ordinalOfFirstMatchForFrame(&m_ownerFrame); |
737 } | 735 } |
738 | 736 |
739 } // namespace blink | 737 } // namespace blink |
OLD | NEW |