summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Scott <phanna@android.com>2010-12-16 09:02:05 -0500
committerPatrick Scott <phanna@android.com>2010-12-16 13:43:42 -0500
commiteae4493cc3434169fc14b44b851dac62db492aa5 (patch)
tree1bb489ee4eea4d39dc2f0c8156e40535098afabf
parent74427af10b1794f0e99b7e7a451c4a40902c98f4 (diff)
downloadexternal_webkit-eae4493cc3434169fc14b44b851dac62db492aa5.zip
external_webkit-eae4493cc3434169fc14b44b851dac62db492aa5.tar.gz
external_webkit-eae4493cc3434169fc14b44b851dac62db492aa5.tar.bz2
Pass redirects through canHandleRequest.
Force the user gesture global to true in order for canHandleRequest to ask the application. Bug: 3278072 Change-Id: I1f821ba42c6c630465658b7044ee89c7255eb9a1
-rw-r--r--WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp3
-rw-r--r--WebKit/android/WebCoreSupport/WebUrlLoaderClient.cpp6
2 files changed, 7 insertions, 2 deletions
diff --git a/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp b/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp
index 4053e56..c56348c 100644
--- a/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp
+++ b/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp
@@ -567,9 +567,8 @@ void FrameLoaderClientAndroid::dispatchDecidePolicyForNavigationAction(FramePoli
if (action.type() == NavigationTypeFormResubmitted) {
m_webFrame->decidePolicyForFormResubmission(func);
return;
- } else {
+ } else
(m_frame->loader()->policyChecker()->*func)(PolicyUse);
- }
}
void FrameLoaderClientAndroid::dispatchWillSubmitForm(FramePolicyFunction func, PassRefPtr<FormState>) {
diff --git a/WebKit/android/WebCoreSupport/WebUrlLoaderClient.cpp b/WebKit/android/WebCoreSupport/WebUrlLoaderClient.cpp
index 0d7981a..7bba3c2 100644
--- a/WebKit/android/WebCoreSupport/WebUrlLoaderClient.cpp
+++ b/WebKit/android/WebCoreSupport/WebUrlLoaderClient.cpp
@@ -33,6 +33,7 @@
#include "ResourceHandle.h"
#include "ResourceHandleClient.h"
#include "ResourceResponse.h"
+#include "UserGestureIndicator.h"
#include "WebCoreFrameBridge.h"
#include "WebRequest.h"
#include "WebResourceRequest.h"
@@ -331,6 +332,11 @@ void WebUrlLoaderClient::willSendRequest(PassOwnPtr<WebResponse> webResponse)
if (!isActive())
return;
+ // FIXME: This implies that the original request was from a user gesture.
+ // For now, this is probably ok as this is just here to get the auto-login
+ // demo working. b/3291580.
+ WebCore::UserGestureIndicator gesture(WebCore::DefinitelyProcessingUserGesture);
+
KURL url = webResponse->createKurl();
OwnPtr<WebCore::ResourceRequest> resourceRequest(new WebCore::ResourceRequest(url));
m_resourceHandle->client()->willSendRequest(m_resourceHandle.get(), *resourceRequest, webResponse->createResourceResponse());