Index: third_party/WebKit/Source/core/html/HTMLAnchorElement.cpp |
diff --git a/third_party/WebKit/Source/core/html/HTMLAnchorElement.cpp b/third_party/WebKit/Source/core/html/HTMLAnchorElement.cpp |
index e387666bddadcca9abafcd1e16c180b1d26da8fe..6a2a2ab0ec4a4117dacf4166104d26ad88d235f9 100644 |
--- a/third_party/WebKit/Source/core/html/HTMLAnchorElement.cpp |
+++ b/third_party/WebKit/Source/core/html/HTMLAnchorElement.cpp |
@@ -37,6 +37,7 @@ |
#include "core/page/ChromeClient.h" |
#include "platform/network/NetworkHints.h" |
#include "platform/weborigin/SecurityPolicy.h" |
+#include "public/platform/resource_hints.mojom-blink.h" |
namespace blink { |
@@ -44,15 +45,6 @@ using namespace HTMLNames; |
class HTMLAnchorElement::NavigationHintSender : public GarbageCollected<HTMLAnchorElement::NavigationHintSender> { |
public: |
- // TODO(horo): Move WebNavigationHintType to public/ directory. |
- enum class WebNavigationHintType { |
- Unknown, |
- LinkMouseDown, |
- LinkTapUnconfirmed, |
- LinkTapDown, |
- Last = LinkTapDown |
- }; |
- |
static NavigationHintSender* create(HTMLAnchorElement* anchorElement) |
{ |
return new NavigationHintSender(anchorElement); |
@@ -64,7 +56,7 @@ public: |
private: |
explicit NavigationHintSender(HTMLAnchorElement*); |
bool shouldSendNavigationHint() const; |
- void maybeSendNavigationHint(WebNavigationHintType); |
+ void maybeSendNavigationHint(mojom::blink::NavigationHintType); |
Member<HTMLAnchorElement> m_anchorElement; |
}; |
@@ -72,11 +64,11 @@ private: |
void HTMLAnchorElement::NavigationHintSender::handleEvent(Event* event) |
{ |
if (event->type() == EventTypeNames::mousedown && event->isMouseEvent() && toMouseEvent(event)->button() == LeftButton) |
- maybeSendNavigationHint(WebNavigationHintType::LinkMouseDown); |
+ maybeSendNavigationHint(mojom::blink::NavigationHintType::LINK_MOUSE_DOWN); |
else if (event->type() == EventTypeNames::gesturetapunconfirmed) |
- maybeSendNavigationHint(WebNavigationHintType::LinkTapUnconfirmed); |
+ maybeSendNavigationHint(mojom::blink::NavigationHintType::LINK_TAP_UNCONFIRMED); |
else if (event->type() == EventTypeNames::gestureshowpress) |
- maybeSendNavigationHint(WebNavigationHintType::LinkTapDown); |
+ maybeSendNavigationHint(mojom::blink::NavigationHintType::LINK_TAP_DOWN); |
} |
DEFINE_TRACE(HTMLAnchorElement::NavigationHintSender) |
@@ -111,12 +103,12 @@ bool HTMLAnchorElement::NavigationHintSender::shouldSendNavigationHint() const |
return true; |
} |
-void HTMLAnchorElement::NavigationHintSender::maybeSendNavigationHint(WebNavigationHintType type) |
+void HTMLAnchorElement::NavigationHintSender::maybeSendNavigationHint(mojom::blink::NavigationHintType type) |
{ |
if (!shouldSendNavigationHint()) |
return; |
- // TODO(horo): Send the navigation hint message to the browser process. |
+ sendNavigationHint(m_anchorElement->href(), type); |
} |
HTMLAnchorElement::HTMLAnchorElement(const QualifiedName& tagName, Document& document) |