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

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

Issue 1413543005: Use FrameTreeNode ID as frameId in extension APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Vend frameIds at 1 location; minimize thread hops for webRequest Created 5 years 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
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 "base/callback_forward.h" 9 #include "base/callback_forward.h"
10 #include "content/common/content_export.h" 10 #include "content/common/content_export.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 // The IPC route identifier of the RenderFrame. 88 // The IPC route identifier of the RenderFrame.
89 // To get a WebContents, use GetWebContentsGetterForRequest instead. 89 // To get a WebContents, use GetWebContentsGetterForRequest instead.
90 // TODO(jam): once all navigation and resource requests are sent between 90 // TODO(jam): once all navigation and resource requests are sent between
91 // frames and RenderView/RenderViewHost aren't involved we can remove this and 91 // frames and RenderView/RenderViewHost aren't involved we can remove this and
92 // just use GetRouteID above. 92 // just use GetRouteID above.
93 virtual int GetRenderFrameID() const = 0; 93 virtual int GetRenderFrameID() const = 0;
94 94
95 // True if GetRenderFrameID() represents a main frame in the RenderView. 95 // True if GetRenderFrameID() represents a main frame in the RenderView.
96 virtual bool IsMainFrame() const = 0; 96 virtual bool IsMainFrame() const = 0;
97 97
98 // True if GetParentRenderFrameID() represents a main frame in the RenderView. 98 // True if the frame's parent represents a main frame in the RenderView.
99 virtual bool ParentIsMainFrame() const = 0; 99 virtual bool ParentIsMainFrame() const = 0;
100 100
101 // Routing ID of parent frame of frame that sent this resource request.
102 // -1 if unknown / invalid.
103 virtual int GetParentRenderFrameID() const = 0;
104
105 // Returns the associated resource type. 101 // Returns the associated resource type.
106 virtual ResourceType GetResourceType() const = 0; 102 virtual ResourceType GetResourceType() const = 0;
107 103
108 // Returns the process type that initiated this request. 104 // Returns the process type that initiated this request.
109 virtual int GetProcessType() const = 0; 105 virtual int GetProcessType() const = 0;
110 106
111 // Returns the associated referrer policy. 107 // Returns the associated referrer policy.
112 virtual blink::WebReferrerPolicy GetReferrerPolicy() const = 0; 108 virtual blink::WebReferrerPolicy GetReferrerPolicy() const = 0;
113 109
114 // Returns the associated visibility state at the time the request was started 110 // Returns the associated visibility state at the time the request was started
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 // Whether this request if using Lo-Fi mode. 142 // Whether this request if using Lo-Fi mode.
147 virtual bool IsUsingLoFi() const = 0; 143 virtual bool IsUsingLoFi() const = 0;
148 144
149 protected: 145 protected:
150 virtual ~ResourceRequestInfo() {} 146 virtual ~ResourceRequestInfo() {}
151 }; 147 };
152 148
153 } // namespace content 149 } // namespace content
154 150
155 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_REQUEST_INFO_H_ 151 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_REQUEST_INFO_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698