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

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

Issue 11428122: Let content_unittests almost build with the components build on android (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 8 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
« no previous file with comments | « content/renderer/android/email_detector.h ('k') | media/audio/android/audio_manager_android.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_PHONE_NUMBER_DETECTOR_H_ 5 #ifndef CONTENT_RENDERER_ANDROID_PHONE_NUMBER_DETECTOR_H_
6 #define CONTENT_RENDERER_ANDROID_PHONE_NUMBER_DETECTOR_H_ 6 #define CONTENT_RENDERER_ANDROID_PHONE_NUMBER_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/renderer/android/content_detector.h" 10 #include "content/renderer/android/content_detector.h"
10 11
11 namespace content { 12 namespace content {
12 13
13 class PhoneNumberDetectorTest; 14 class PhoneNumberDetectorTest;
14 15
15 // Finds a telephone number in the given content text string. 16 // Finds a telephone number in the given content text string.
16 class PhoneNumberDetector : public ContentDetector { 17 class CONTENT_EXPORT PhoneNumberDetector : public ContentDetector {
17 public: 18 public:
18 PhoneNumberDetector(); 19 PhoneNumberDetector();
19 explicit PhoneNumberDetector(const std::string& region); 20 explicit PhoneNumberDetector(const std::string& region);
20 virtual ~PhoneNumberDetector(); 21 virtual ~PhoneNumberDetector();
21 22
22 private: 23 private:
23 friend class PhoneNumberDetectorTest; 24 friend class PhoneNumberDetectorTest;
24 25
25 // Implementation of ContentDetector. 26 // Implementation of ContentDetector.
26 virtual bool FindContent(const string16::const_iterator& begin, 27 virtual bool FindContent(const string16::const_iterator& begin,
27 const string16::const_iterator& end, 28 const string16::const_iterator& end,
28 size_t* start_pos, 29 size_t* start_pos,
29 size_t* end_pos, 30 size_t* end_pos,
30 std::string* content_text) OVERRIDE; 31 std::string* content_text) OVERRIDE;
31 virtual GURL GetIntentURL(const std::string& content_text) OVERRIDE; 32 virtual GURL GetIntentURL(const std::string& content_text) OVERRIDE;
32 virtual size_t GetMaximumContentLength() OVERRIDE; 33 virtual size_t GetMaximumContentLength() OVERRIDE;
33 34
34 const std::string region_code_; 35 const std::string region_code_;
35 36
36 DISALLOW_COPY_AND_ASSIGN(PhoneNumberDetector); 37 DISALLOW_COPY_AND_ASSIGN(PhoneNumberDetector);
37 }; 38 };
38 39
39 } // namespace content 40 } // namespace content
40 41
41 #endif // CONTENT_RENDERER_ANDROID_PHONE_NUMBER_DETECTOR_H_ 42 #endif // CONTENT_RENDERER_ANDROID_PHONE_NUMBER_DETECTOR_H_
OLDNEW
« no previous file with comments | « content/renderer/android/email_detector.h ('k') | media/audio/android/audio_manager_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698