| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2009, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2009, 2011 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies) |
| 4 * Copyright (C) 2012, Samsung Electronics. All rights reserved. | 4 * Copyright (C) 2012, Samsung Electronics. All rights reserved. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 | 23 |
| 24 #include "core/dom/Document.h" | 24 #include "core/dom/Document.h" |
| 25 #include "core/dom/Element.h" | 25 #include "core/dom/Element.h" |
| 26 #include "core/frame/LocalFrame.h" | 26 #include "core/frame/LocalFrame.h" |
| 27 #include "core/inspector/InspectorInstrumentation.h" | 27 #include "core/inspector/InspectorInstrumentation.h" |
| 28 #include "core/layout/HitTestResult.h" | 28 #include "core/layout/HitTestResult.h" |
| 29 #include "core/page/FrameTree.h" | 29 #include "core/page/FrameTree.h" |
| 30 #include "core/page/ScopedPageLoadDeferrer.h" | 30 #include "core/page/ScopedPageLoadDeferrer.h" |
| 31 #include "core/page/WindowFeatures.h" | 31 #include "core/page/WindowFeatures.h" |
| 32 #include "platform/geometry/IntRect.h" | 32 #include "platform/geometry/IntRect.h" |
| 33 #include "platform/network/NetworkHints.h" | 33 #include "public/platform/Platform.h" |
| 34 #include "public/platform/WebScreenInfo.h" | 34 #include "public/platform/WebScreenInfo.h" |
| 35 #include <algorithm> | 35 #include <algorithm> |
| 36 | 36 |
| 37 namespace blink { | 37 namespace blink { |
| 38 | 38 |
| 39 void ChromeClient::setWindowRectWithAdjustment(const IntRect& pendingRect) | 39 void ChromeClient::setWindowRectWithAdjustment(const IntRect& pendingRect) |
| 40 { | 40 { |
| 41 IntRect screen = screenInfo().availableRect; | 41 IntRect screen = screenInfo().availableRect; |
| 42 IntRect window = pendingRect; | 42 IntRect window = pendingRect; |
| 43 | 43 |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 if (!canOpenModalIfDuringPageDismissal(frame->tree().top(), ChromeClient::Pr
omptDialog, prompt)) | 124 if (!canOpenModalIfDuringPageDismissal(frame->tree().top(), ChromeClient::Pr
omptDialog, prompt)) |
| 125 return false; | 125 return false; |
| 126 return openJavaScriptDialog(frame, prompt, ChromeClient::PromptDialog, [this
, frame, &prompt, &defaultValue, &result]() { | 126 return openJavaScriptDialog(frame, prompt, ChromeClient::PromptDialog, [this
, frame, &prompt, &defaultValue, &result]() { |
| 127 return openJavaScriptPromptDelegate(frame, prompt, defaultValue, result)
; | 127 return openJavaScriptPromptDelegate(frame, prompt, defaultValue, result)
; |
| 128 }); | 128 }); |
| 129 } | 129 } |
| 130 | 130 |
| 131 void ChromeClient::mouseDidMoveOverElement(const HitTestResult& result) | 131 void ChromeClient::mouseDidMoveOverElement(const HitTestResult& result) |
| 132 { | 132 { |
| 133 if (result.innerNode() && result.innerNode()->document().isDNSPrefetchEnable
d()) | 133 if (result.innerNode() && result.innerNode()->document().isDNSPrefetchEnable
d()) |
| 134 prefetchDNS(result.absoluteLinkURL().host()); | 134 Platform::current()->speculativePreresolve(result.absoluteLinkURL()); |
| 135 | 135 |
| 136 showMouseOverURL(result); | 136 showMouseOverURL(result); |
| 137 | 137 |
| 138 setToolTip(result); | 138 setToolTip(result); |
| 139 } | 139 } |
| 140 | 140 |
| 141 void ChromeClient::setToolTip(const HitTestResult& result) | 141 void ChromeClient::setToolTip(const HitTestResult& result) |
| 142 { | 142 { |
| 143 // First priority is a potential toolTip representing a spelling or grammar | 143 // First priority is a potential toolTip representing a spelling or grammar |
| 144 // error. | 144 // error. |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 { | 184 { |
| 185 // Defer loads in case the client method runs a new event loop that would | 185 // Defer loads in case the client method runs a new event loop that would |
| 186 // otherwise cause the load to continue while we're in the middle of | 186 // otherwise cause the load to continue while we're in the middle of |
| 187 // executing JavaScript. | 187 // executing JavaScript. |
| 188 ScopedPageLoadDeferrer deferrer; | 188 ScopedPageLoadDeferrer deferrer; |
| 189 | 189 |
| 190 printDelegate(frame); | 190 printDelegate(frame); |
| 191 } | 191 } |
| 192 | 192 |
| 193 } // namespace blink | 193 } // namespace blink |
| OLD | NEW |