| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2000 Simon Hausmann <hausmann@kde.org> | 4 * (C) 2000 Simon Hausmann <hausmann@kde.org> |
| 5 * Copyright (C) 2003, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. | 5 * Copyright (C) 2003, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. |
| 6 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) | 6 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 #include "core/frame/UseCounter.h" | 30 #include "core/frame/UseCounter.h" |
| 31 #include "core/html/HTMLImageElement.h" | 31 #include "core/html/HTMLImageElement.h" |
| 32 #include "core/html/parser/HTMLParserIdioms.h" | 32 #include "core/html/parser/HTMLParserIdioms.h" |
| 33 #include "core/layout/LayoutBox.h" | 33 #include "core/layout/LayoutBox.h" |
| 34 #include "core/loader/FrameLoadRequest.h" | 34 #include "core/loader/FrameLoadRequest.h" |
| 35 #include "core/loader/FrameLoaderClient.h" | 35 #include "core/loader/FrameLoaderClient.h" |
| 36 #include "core/loader/PingLoader.h" | 36 #include "core/loader/PingLoader.h" |
| 37 #include "core/page/ChromeClient.h" | 37 #include "core/page/ChromeClient.h" |
| 38 #include "platform/network/NetworkHints.h" | 38 #include "platform/network/NetworkHints.h" |
| 39 #include "platform/weborigin/SecurityPolicy.h" | 39 #include "platform/weborigin/SecurityPolicy.h" |
| 40 #include "public/platform/WebNavigationHintType.h" |
| 40 | 41 |
| 41 namespace blink { | 42 namespace blink { |
| 42 | 43 |
| 43 using namespace HTMLNames; | 44 using namespace HTMLNames; |
| 44 | 45 |
| 45 class HTMLAnchorElement::NavigationHintSender : public GarbageCollected<HTMLAnch
orElement::NavigationHintSender> { | 46 class HTMLAnchorElement::NavigationHintSender : public GarbageCollected<HTMLAnch
orElement::NavigationHintSender> { |
| 46 public: | 47 public: |
| 47 // TODO(horo): Move WebNavigationHintType to public/ directory. | |
| 48 enum class WebNavigationHintType { | |
| 49 Unknown, | |
| 50 LinkMouseDown, | |
| 51 LinkTapUnconfirmed, | |
| 52 LinkTapDown, | |
| 53 Last = LinkTapDown | |
| 54 }; | |
| 55 | |
| 56 static NavigationHintSender* create(HTMLAnchorElement* anchorElement) | 48 static NavigationHintSender* create(HTMLAnchorElement* anchorElement) |
| 57 { | 49 { |
| 58 return new NavigationHintSender(anchorElement); | 50 return new NavigationHintSender(anchorElement); |
| 59 } | 51 } |
| 60 void handleEvent(Event*); | 52 void handleEvent(Event*); |
| 61 | 53 |
| 62 DECLARE_TRACE(); | 54 DECLARE_TRACE(); |
| 63 | 55 |
| 64 private: | 56 private: |
| 65 explicit NavigationHintSender(HTMLAnchorElement*); | 57 explicit NavigationHintSender(HTMLAnchorElement*); |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 return false; | 101 return false; |
| 110 | 102 |
| 111 return true; | 103 return true; |
| 112 } | 104 } |
| 113 | 105 |
| 114 void HTMLAnchorElement::NavigationHintSender::maybeSendNavigationHint(WebNavigat
ionHintType type) | 106 void HTMLAnchorElement::NavigationHintSender::maybeSendNavigationHint(WebNavigat
ionHintType type) |
| 115 { | 107 { |
| 116 if (!shouldSendNavigationHint()) | 108 if (!shouldSendNavigationHint()) |
| 117 return; | 109 return; |
| 118 | 110 |
| 119 // TODO(horo): Send the navigation hint message to the browser process. | 111 sendNavigationHint(m_anchorElement->href(), type); |
| 120 } | 112 } |
| 121 | 113 |
| 122 HTMLAnchorElement::HTMLAnchorElement(const QualifiedName& tagName, Document& doc
ument) | 114 HTMLAnchorElement::HTMLAnchorElement(const QualifiedName& tagName, Document& doc
ument) |
| 123 : HTMLElement(tagName, document) | 115 : HTMLElement(tagName, document) |
| 124 , m_linkRelations(0) | 116 , m_linkRelations(0) |
| 125 , m_cachedVisitedLinkHash(0) | 117 , m_cachedVisitedLinkHash(0) |
| 126 , m_wasFocusedByMouse(false) | 118 , m_wasFocusedByMouse(false) |
| 127 { | 119 { |
| 128 } | 120 } |
| 129 | 121 |
| (...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 484 } | 476 } |
| 485 | 477 |
| 486 HTMLAnchorElement::NavigationHintSender* HTMLAnchorElement::ensureNavigationHint
Sender() | 478 HTMLAnchorElement::NavigationHintSender* HTMLAnchorElement::ensureNavigationHint
Sender() |
| 487 { | 479 { |
| 488 if (!m_navigationHintSender) | 480 if (!m_navigationHintSender) |
| 489 m_navigationHintSender = NavigationHintSender::create(this); | 481 m_navigationHintSender = NavigationHintSender::create(this); |
| 490 return m_navigationHintSender; | 482 return m_navigationHintSender; |
| 491 } | 483 } |
| 492 | 484 |
| 493 } // namespace blink | 485 } // namespace blink |
| OLD | NEW |