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

Side by Side Diff: content/renderer/android/content_detector.h

Issue 102593002: Convert string16 to base::string16 in content. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_RENDERER_ANDROID_CONTENT_DETECTOR_H_ 5 #ifndef CONTENT_RENDERER_ANDROID_CONTENT_DETECTOR_H_
6 #define CONTENT_RENDERER_ANDROID_CONTENT_DETECTOR_H_ 6 #define CONTENT_RENDERER_ANDROID_CONTENT_DETECTOR_H_
7 7
8 #include "third_party/WebKit/public/web/WebRange.h" 8 #include "third_party/WebKit/public/web/WebRange.h"
9 #include "url/gurl.h" 9 #include "url/gurl.h"
10 10
(...skipping 26 matching lines...) Expand all
37 // position. If no content is found a null range will be returned. 37 // position. If no content is found a null range will be returned.
38 Result FindTappedContent(const blink::WebHitTestResult& hit_test); 38 Result FindTappedContent(const blink::WebHitTestResult& hit_test);
39 39
40 protected: 40 protected:
41 ContentDetector() {} 41 ContentDetector() {}
42 42
43 // Parses the input string defined by the begin/end iterators returning true 43 // Parses the input string defined by the begin/end iterators returning true
44 // if the desired content is found. The start and end positions relative to 44 // if the desired content is found. The start and end positions relative to
45 // the input iterators are returned in start_pos and end_pos. 45 // the input iterators are returned in start_pos and end_pos.
46 // The end position is assumed to be non-inclusive. 46 // The end position is assumed to be non-inclusive.
47 virtual bool FindContent(const string16::const_iterator& begin, 47 virtual bool FindContent(const base::string16::const_iterator& begin,
48 const string16::const_iterator& end, 48 const base::string16::const_iterator& end,
49 size_t* start_pos, 49 size_t* start_pos,
50 size_t* end_pos, 50 size_t* end_pos,
51 std::string* content_text) = 0; 51 std::string* content_text) = 0;
52 52
53 // Returns the intent URL that should process the content, if any. 53 // Returns the intent URL that should process the content, if any.
54 virtual GURL GetIntentURL(const std::string& content_text) = 0; 54 virtual GURL GetIntentURL(const std::string& content_text) = 0;
55 55
56 // Returns the maximum length of text to be extracted around the tapped 56 // Returns the maximum length of text to be extracted around the tapped
57 // position in order to search for content. 57 // position in order to search for content.
58 virtual size_t GetMaximumContentLength() = 0; 58 virtual size_t GetMaximumContentLength() = 0;
59 59
60 blink::WebRange FindContentRange(const blink::WebHitTestResult& hit_test, 60 blink::WebRange FindContentRange(const blink::WebHitTestResult& hit_test,
61 std::string* content_text); 61 std::string* content_text);
62 62
63 DISALLOW_COPY_AND_ASSIGN(ContentDetector); 63 DISALLOW_COPY_AND_ASSIGN(ContentDetector);
64 }; 64 };
65 65
66 } // namespace content 66 } // namespace content
67 67
68 #endif // CONTENT_RENDERER_ANDROID_CONTENT_DETECTOR_H_ 68 #endif // CONTENT_RENDERER_ANDROID_CONTENT_DETECTOR_H_
OLDNEW
« no previous file with comments | « content/renderer/android/address_detector.cc ('k') | content/renderer/android/content_detector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698