Index: content/renderer/android/content_detector.h |
diff --git a/content/renderer/android/content_detector.h b/content/renderer/android/content_detector.h |
index 4488f142dc66a1ce2598c95772b2bd2760758e25..ea85fc7e7256746875e1f5590d5e7f572d73bd20 100644 |
--- a/content/renderer/android/content_detector.h |
+++ b/content/renderer/android/content_detector.h |
@@ -8,7 +8,7 @@ |
#include <stddef.h> |
#include "base/macros.h" |
-#include "third_party/WebKit/public/web/WebRange.h" |
+#include "third_party/WebKit/public/platform/WebURL.h" |
#include "url/gurl.h" |
namespace blink { |
@@ -20,26 +20,11 @@ namespace content { |
// Base class for text-based content detectors. |
class ContentDetector { |
public: |
- // Holds the content detection results. |
- struct Result { |
- Result(); |
- Result(const blink::WebRange& content_boundaries, |
- const std::string& text, |
- const GURL& intent_url); |
- Result(const Result& other); |
- ~Result(); |
- |
- bool valid; |
- blink::WebRange content_boundaries; |
- std::string text; // Processed text of the content. |
- GURL intent_url; // URL of the intent that should process this content. |
- }; |
- |
virtual ~ContentDetector() {} |
- // Returns a WebKit range delimiting the contents found around the tapped |
- // position. If no content is found a null range will be returned. |
- Result FindTappedContent(const blink::WebHitTestResult& hit_test); |
+ // Returns an intent URL for the content around the hit_test. |
+ // If no content is found, an empty URL will be returned. |
+ blink::WebURL FindTappedContent(const blink::WebHitTestResult& hit_test); |
protected: |
ContentDetector() {} |
@@ -61,8 +46,8 @@ class ContentDetector { |
// position in order to search for content. |
virtual size_t GetMaximumContentLength() = 0; |
- blink::WebRange FindContentRange(const blink::WebHitTestResult& hit_test, |
- std::string* content_text); |
+ bool FindContentRange(const blink::WebHitTestResult& hit_test, |
+ std::string* content_text); |
DISALLOW_COPY_AND_ASSIGN(ContentDetector); |
}; |