Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1210)

Unified Diff: content/browser/renderer_host/resource_dispatcher_host.h

Issue 7582004: Add load flag indicating a request is probably the result of a user gesture. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to lkgr. Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/browser/renderer_host/resource_dispatcher_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/resource_dispatcher_host.h
diff --git a/content/browser/renderer_host/resource_dispatcher_host.h b/content/browser/renderer_host/resource_dispatcher_host.h
index d6c5ce70e77034d25b540cbe6d5989761dfcd80e..27a52ac6dee8a1d48ce9496fc278cc0eea4eea25 100644
--- a/content/browser/renderer_host/resource_dispatcher_host.h
+++ b/content/browser/renderer_host/resource_dispatcher_host.h
@@ -20,6 +20,7 @@
#include "base/basictypes.h"
#include "base/gtest_prod_util.h"
#include "base/memory/scoped_ptr.h"
+#include "base/time.h"
#include "base/timer.h"
#include "content/browser/renderer_host/resource_queue.h"
#include "content/common/child_process_info.h"
@@ -40,6 +41,7 @@ class ResourceHandler;
class ResourceMessageFilter;
class SaveFileManager;
class SSLClientAuthHandler;
+class TabContents;
class WebKitThread;
struct DownloadSaveInfo;
struct GlobalRequestID;
@@ -201,6 +203,8 @@ class ResourceDispatcherHost : public net::URLRequest::Delegate {
void OnResponseCompleted(net::URLRequest* request);
+ void OnUserGesture(TabContents* tab);
+
// Helper functions to get the dispatcher's request info for the request.
// If the dispatcher didn't create the request then NULL is returned.
static ResourceDispatcherHostRequestInfo* InfoForRequest(
@@ -502,6 +506,11 @@ class ResourceDispatcherHost : public net::URLRequest::Delegate {
// kAvgBytesPerOutstandingRequest)
int max_outstanding_requests_cost_per_process_;
+ // Time of the last user gesture. Stored so that we can add a load
+ // flag to requests occurring soon after a gesture to indicate they
+ // may be because of explicit user action.
+ base::TimeTicks last_user_gesture_time_;
+
// Used during IPC message dispatching so that the handlers can get a pointer
// to the source of the message.
ResourceMessageFilter* filter_;
« no previous file with comments | « no previous file | content/browser/renderer_host/resource_dispatcher_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698