summaryrefslogtreecommitdiffstats
path: root/Source/WebKit/android/content/address_detector.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebKit/android/content/address_detector.cpp')
-rw-r--r--Source/WebKit/android/content/address_detector.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/WebKit/android/content/address_detector.cpp b/Source/WebKit/android/content/address_detector.cpp
index 8c9f230..f6657d9 100644
--- a/Source/WebKit/android/content/address_detector.cpp
+++ b/Source/WebKit/android/content/address_detector.cpp
@@ -40,6 +40,7 @@
#include "base/utf_string_conversions.h"
#include "net/base/escape.h"
+#include "Settings.h"
#include "WebString.h"
#include <wtf/HashSet.h>
@@ -157,6 +158,11 @@ size_t AddressDetector::GetMaximumContentLength() {
return kMaxAddressLength;
}
+bool AddressDetector::IsEnabled(const WebKit::WebHitTestInfo& hit_test) {
+ WebCore::Settings* settings = GetSettings(hit_test);
+ return settings && settings->formatDetectionAddress();
+}
+
bool AddressDetector::FindContent(const string16::const_iterator& begin,
const string16::const_iterator& end, size_t* start_pos, size_t* end_pos) {
HouseNumberParser house_number_parser;