Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2276)

Unified Diff: content/renderer/android/content_detector.h

Issue 2222813002: Remove the use of WebRange in ContentDetector. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Maybe now fix compile. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/renderer/android/content_detector.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
};
« no previous file with comments | « no previous file | content/renderer/android/content_detector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698