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

Side by Side Diff: content/public/browser/resource_request_info.h

Issue 650043002: Improve ResourceRequestInfo::HasUserGesture API docs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updates Created 6 years, 2 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_PUBLIC_BROWSER_RESOURCE_REQUEST_INFO_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_RESOURCE_REQUEST_INFO_H_
6 #define CONTENT_PUBLIC_BROWSER_RESOURCE_REQUEST_INFO_H_ 6 #define CONTENT_PUBLIC_BROWSER_RESOURCE_REQUEST_INFO_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "content/common/content_export.h" 9 #include "content/common/content_export.h"
10 #include "content/public/common/resource_type.h" 10 #include "content/public/common/resource_type.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 91
92 // Returns the associated visibility state at the time the request was started 92 // Returns the associated visibility state at the time the request was started
93 // in the renderer. 93 // in the renderer.
94 virtual blink::WebPageVisibilityState GetVisibilityState() const = 0; 94 virtual blink::WebPageVisibilityState GetVisibilityState() const = 0;
95 95
96 // Returns the associated page transition type. 96 // Returns the associated page transition type.
97 virtual ui::PageTransition GetPageTransition() const = 0; 97 virtual ui::PageTransition GetPageTransition() const = 0;
98 98
99 // True if the request was initiated by a user action (like a tap to follow 99 // True if the request was initiated by a user action (like a tap to follow
100 // a link). 100 // a link).
101 //
102 // Note that a false value does not mean the request was not initiated by a
103 // user gesture. Also note that the fact that a user gesture was active
104 // while the request was created does not imply that the user consciously
105 // wanted this request to happen nor is aware of it.
106 //
107 // DO NOT BASE SECURITY DECISIONS ON THIS FLAG!
mkosiba (inactive) 2014/10/17 08:54:33 Yes, you should be especially wary of using this t
Randy Smith (Not in Mondays) 2014/10/20 14:20:46 We'd welcome other other suggestions as to how to
101 virtual bool HasUserGesture() const = 0; 108 virtual bool HasUserGesture() const = 0;
102 109
103 // True if ResourceController::CancelAndIgnore() was called. For example, 110 // True if ResourceController::CancelAndIgnore() was called. For example,
104 // the requested URL may be being loaded by an external program. 111 // the requested URL may be being loaded by an external program.
105 virtual bool WasIgnoredByHandler() const = 0; 112 virtual bool WasIgnoredByHandler() const = 0;
106 113
107 // Returns false if there is NOT an associated render frame. 114 // Returns false if there is NOT an associated render frame.
108 virtual bool GetAssociatedRenderFrame(int* render_process_id, 115 virtual bool GetAssociatedRenderFrame(int* render_process_id,
109 int* render_frame_id) const = 0; 116 int* render_frame_id) const = 0;
110 117
111 // Returns true if this is associated with an asynchronous request. 118 // Returns true if this is associated with an asynchronous request.
112 virtual bool IsAsync() const = 0; 119 virtual bool IsAsync() const = 0;
113 120
114 // Whether this is a download. 121 // Whether this is a download.
115 virtual bool IsDownload() const = 0; 122 virtual bool IsDownload() const = 0;
116 123
117 protected: 124 protected:
118 virtual ~ResourceRequestInfo() {} 125 virtual ~ResourceRequestInfo() {}
119 }; 126 };
120 127
121 } // namespace content 128 } // namespace content
122 129
123 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_REQUEST_INFO_H_ 130 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_REQUEST_INFO_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698