2010-11-08 Pierre-Antoine LaFayette <pierre.lafayette@gmail.com>

        Reviewed by Darin Fisher.

        [chromium] Adding hasUserGesture flag to the ResourceRequest
        https://bugs.webkit.org/show_bug.cgi?id=37057

        This flag is to be used on the browser side to indicate when a
        download has been user initiated.

        No new tests. This change will be tested through a browser UI test.

        * platform/network/chromium/ResourceRequest.h:
        (WebCore::ResourceRequest::ResourceRequest):
        (WebCore::ResourceRequest::hasUserGesture):
        (WebCore::ResourceRequest::setHasUserGesture):
2010-11-08  Pierre-Antoine LaFayette  <pierre.lafayette@gmail.com>

        Reviewed by Darin Fisher.

        [chromium] Adding hasUserGesture flag to the ResourceRequest
        https://bugs.webkit.org/show_bug.cgi?id=37057

        This flag is to be used on the browser side to indicate when a
        download has been user initiated.

        * public/WebURLRequest.h:
        * src/WebURLRequest.cpp:
        (WebKit::WebURLRequest::hasUserGesture):
        (WebKit::WebURLRequest::setHasUserGesture):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71587 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 1fc82eaf
2010-11-08 Pierre-Antoine LaFayette <pierre.lafayette@gmail.com>
Reviewed by Darin Fisher.
[chromium] Adding hasUserGesture flag to the ResourceRequest
https://bugs.webkit.org/show_bug.cgi?id=37057
This flag is to be used on the browser side to indicate when a
download has been user initiated.
No new tests. This change will be tested through a browser UI test.
* platform/network/chromium/ResourceRequest.h:
(WebCore::ResourceRequest::ResourceRequest):
(WebCore::ResourceRequest::hasUserGesture):
(WebCore::ResourceRequest::setHasUserGesture):
2010-11-08 Chris Rogers <crogers@google.com>
Reviewed by Kenneth Russell.
......@@ -42,6 +42,7 @@ PassOwnPtr<CrossThreadResourceRequestData> ResourceRequest::doPlatformCopyData(P
data->m_requestorID = m_requestorID;
data->m_requestorProcessID = m_requestorProcessID;
data->m_appCacheHostID = m_appCacheHostID;
data->m_hasUserGesture = m_hasUserGesture;
return data;
}
......@@ -50,6 +51,7 @@ void ResourceRequest::doPlatformAdopt(PassOwnPtr<CrossThreadResourceRequestData>
m_requestorID = data->m_requestorID;
m_requestorProcessID = data->m_requestorProcessID;
m_appCacheHostID = data->m_appCacheHostID;
m_hasUserGesture = data->m_hasUserGesture;
}
} // namespace WebCore
......@@ -41,6 +41,7 @@ namespace WebCore {
, m_requestorID(0)
, m_requestorProcessID(0)
, m_appCacheHostID(0)
, m_hasUserGesture(false)
{
}
......@@ -49,6 +50,7 @@ namespace WebCore {
, m_requestorID(0)
, m_requestorProcessID(0)
, m_appCacheHostID(0)
, m_hasUserGesture(false)
{
}
......@@ -57,6 +59,7 @@ namespace WebCore {
, m_requestorID(0)
, m_requestorProcessID(0)
, m_appCacheHostID(0)
, m_hasUserGesture(false)
{
setHTTPReferrer(referrer);
}
......@@ -66,6 +69,7 @@ namespace WebCore {
, m_requestorID(0)
, m_requestorProcessID(0)
, m_appCacheHostID(0)
, m_hasUserGesture(false)
{
}
......@@ -84,6 +88,10 @@ namespace WebCore {
int appCacheHostID() const { return m_appCacheHostID; }
void setAppCacheHostID(int id) { m_appCacheHostID = id; }
// True if request was user initiated.
bool hasUserGesture() const { return m_hasUserGesture; }
void setHasUserGesture(bool hasUserGesture) { m_hasUserGesture = hasUserGesture; }
private:
friend class ResourceRequestBase;
......@@ -96,12 +104,14 @@ namespace WebCore {
int m_requestorID;
int m_requestorProcessID;
int m_appCacheHostID;
bool m_hasUserGesture;
};
struct CrossThreadResourceRequestData : public CrossThreadResourceRequestDataBase {
int m_requestorID;
int m_requestorProcessID;
int m_appCacheHostID;
bool m_hasUserGesture;
};
} // namespace WebCore
......
2010-11-08 Pierre-Antoine LaFayette <pierre.lafayette@gmail.com>
Reviewed by Darin Fisher.
[chromium] Adding hasUserGesture flag to the ResourceRequest
https://bugs.webkit.org/show_bug.cgi?id=37057
This flag is to be used on the browser side to indicate when a
download has been user initiated.
* public/WebURLRequest.h:
* src/WebURLRequest.cpp:
(WebKit::WebURLRequest::hasUserGesture):
(WebKit::WebURLRequest::setHasUserGesture):
2010-11-08 Alexey Proskuryakov <ap@apple.com>
Reviewed by Darin Adler.
......
......@@ -140,6 +140,10 @@ public:
WEBKIT_API TargetType targetType() const;
WEBKIT_API void setTargetType(TargetType);
// True if the request was user initiated.
WEBKIT_API bool hasUserGesture() const;
WEBKIT_API void setHasUserGesture(bool);
// A consumer controlled value intended to be used to identify the
// requestor.
WEBKIT_API int requestorID() const;
......
......@@ -221,6 +221,16 @@ WebURLRequest::TargetType WebURLRequest::targetType() const
return static_cast<TargetType>(m_private->m_resourceRequest->targetType());
}
bool WebURLRequest::hasUserGesture() const
{
return m_private->m_resourceRequest->hasUserGesture();
}
void WebURLRequest::setHasUserGesture(bool hasUserGesture)
{
m_private->m_resourceRequest->setHasUserGesture(hasUserGesture);
}
void WebURLRequest::setTargetType(TargetType targetType)
{
m_private->m_resourceRequest->setTargetType(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment