OLD | NEW |
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_EMAIL_DETECTOR_H_ | 5 #ifndef CONTENT_RENDERER_ANDROID_EMAIL_DETECTOR_H_ |
6 #define CONTENT_RENDERER_ANDROID_EMAIL_DETECTOR_H_ | 6 #define CONTENT_RENDERER_ANDROID_EMAIL_DETECTOR_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "content/common/content_export.h" | 9 #include "content/common/content_export.h" |
10 #include "content/renderer/android/content_detector.h" | 10 #include "content/renderer/android/content_detector.h" |
11 | 11 |
12 namespace content { | 12 namespace content { |
13 | 13 |
14 class EmailDetectorTest; | 14 class EmailDetectorTest; |
15 | 15 |
16 // Finds email addresses (in most common formats, but not including special | 16 // Finds email addresses (in most common formats, but not including special |
17 // characters) in the given text string. | 17 // characters) in the given text string. |
18 class CONTENT_EXPORT EmailDetector : public ContentDetector { | 18 class CONTENT_EXPORT EmailDetector : public ContentDetector { |
19 public: | 19 public: |
20 EmailDetector(); | 20 EmailDetector(); |
21 | 21 |
22 private: | 22 private: |
23 friend class EmailDetectorTest; | 23 friend class EmailDetectorTest; |
24 | 24 |
25 // Implementation of ContentDetector. | 25 // Implementation of ContentDetector. |
26 virtual bool FindContent(const base::string16::const_iterator& begin, | 26 virtual bool FindContent(const base::string16::const_iterator& begin, |
27 const base::string16::const_iterator& end, | 27 const base::string16::const_iterator& end, |
28 size_t* start_pos, | 28 size_t* start_pos, |
29 size_t* end_pos, | 29 size_t* end_pos, |
30 std::string* content_text) OVERRIDE; | 30 std::string* content_text) override; |
31 virtual GURL GetIntentURL(const std::string& content_text) OVERRIDE; | 31 virtual GURL GetIntentURL(const std::string& content_text) override; |
32 virtual size_t GetMaximumContentLength() OVERRIDE; | 32 virtual size_t GetMaximumContentLength() override; |
33 | 33 |
34 DISALLOW_COPY_AND_ASSIGN(EmailDetector); | 34 DISALLOW_COPY_AND_ASSIGN(EmailDetector); |
35 }; | 35 }; |
36 | 36 |
37 } // namespace content | 37 } // namespace content |
38 | 38 |
39 #endif // CONTENT_RENDERER_ANDROID_EMAIL_DETECTOR_H_ | 39 #endif // CONTENT_RENDERER_ANDROID_EMAIL_DETECTOR_H_ |
OLD | NEW |