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

Side by Side Diff: content/child/request_extra_data.h

Issue 141163002: Make PrerenderTracker's resource_throttle_io_thread_map_ use RenderFrame IDs instead of RenderView … (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: simplify code Created 6 years, 11 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 | Annotate | Revision Log
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_CHILD_REQUEST_EXTRA_DATA_H_ 5 #ifndef CONTENT_CHILD_REQUEST_EXTRA_DATA_H_
6 #define CONTENT_CHILD_REQUEST_EXTRA_DATA_H_ 6 #define CONTENT_CHILD_REQUEST_EXTRA_DATA_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "content/common/content_export.h" 9 #include "content/common/content_export.h"
10 #include "content/public/common/page_transition_types.h" 10 #include "content/public/common/page_transition_types.h"
11 #include "third_party/WebKit/public/web/WebPageVisibilityState.h"
11 #include "webkit/child/weburlrequest_extradata_impl.h" 12 #include "webkit/child/weburlrequest_extradata_impl.h"
12 13
13 namespace content { 14 namespace content {
14 15
15 // The RenderView stores an instance of this class in the "extra data" of each 16 // The RenderView stores an instance of this class in the "extra data" of each
16 // ResourceRequest (see RenderFrameImpl::willSendRequest). 17 // ResourceRequest (see RenderFrameImpl::willSendRequest).
17 class CONTENT_EXPORT RequestExtraData 18 class CONTENT_EXPORT RequestExtraData
18 : NON_EXPORTED_BASE(public webkit_glue::WebURLRequestExtraDataImpl) { 19 : NON_EXPORTED_BASE(public webkit_glue::WebURLRequestExtraDataImpl) {
19 public: 20 public:
20 RequestExtraData(blink::WebReferrerPolicy referrer_policy, 21 RequestExtraData(blink::WebReferrerPolicy referrer_policy,
22 blink::WebPageVisibilityState visibility_state,
21 const blink::WebString& custom_user_agent, 23 const blink::WebString& custom_user_agent,
22 bool was_after_preconnect_request, 24 bool was_after_preconnect_request,
23 int render_frame_id, 25 int render_frame_id,
24 bool is_main_frame, 26 bool is_main_frame,
25 int64 frame_id, 27 int64 frame_id,
26 const GURL& frame_origin, 28 const GURL& frame_origin,
27 bool parent_is_main_frame, 29 bool parent_is_main_frame,
28 int64 parent_frame_id, 30 int64 parent_frame_id,
29 bool allow_download, 31 bool allow_download,
30 PageTransition transition_type, 32 PageTransition transition_type,
31 bool should_replace_current_entry, 33 bool should_replace_current_entry,
32 int transferred_request_child_id, 34 int transferred_request_child_id,
33 int transferred_request_request_id); 35 int transferred_request_request_id);
34 virtual ~RequestExtraData(); 36 virtual ~RequestExtraData();
35 37
38 blink::WebPageVisibilityState visibility_state() const {
39 return visibility_state_;
40 }
36 int render_frame_id() const { return render_frame_id_; } 41 int render_frame_id() const { return render_frame_id_; }
37 bool is_main_frame() const { return is_main_frame_; } 42 bool is_main_frame() const { return is_main_frame_; }
38 int64 frame_id() const { return frame_id_; } 43 int64 frame_id() const { return frame_id_; }
39 GURL frame_origin() const { return frame_origin_; } 44 GURL frame_origin() const { return frame_origin_; }
40 bool parent_is_main_frame() const { return parent_is_main_frame_; } 45 bool parent_is_main_frame() const { return parent_is_main_frame_; }
41 int64 parent_frame_id() const { return parent_frame_id_; } 46 int64 parent_frame_id() const { return parent_frame_id_; }
42 bool allow_download() const { return allow_download_; } 47 bool allow_download() const { return allow_download_; }
43 PageTransition transition_type() const { return transition_type_; } 48 PageTransition transition_type() const { return transition_type_; }
44 bool should_replace_current_entry() const { 49 bool should_replace_current_entry() const {
45 return should_replace_current_entry_; 50 return should_replace_current_entry_;
46 } 51 }
47 int transferred_request_child_id() const { 52 int transferred_request_child_id() const {
48 return transferred_request_child_id_; 53 return transferred_request_child_id_;
49 } 54 }
50 int transferred_request_request_id() const { 55 int transferred_request_request_id() const {
51 return transferred_request_request_id_; 56 return transferred_request_request_id_;
52 } 57 }
53 58
54 private: 59 private:
60 blink::WebPageVisibilityState visibility_state_;
55 int render_frame_id_; 61 int render_frame_id_;
56 bool is_main_frame_; 62 bool is_main_frame_;
57 int64 frame_id_; 63 int64 frame_id_;
58 GURL frame_origin_; 64 GURL frame_origin_;
59 bool parent_is_main_frame_; 65 bool parent_is_main_frame_;
60 int64 parent_frame_id_; 66 int64 parent_frame_id_;
61 bool allow_download_; 67 bool allow_download_;
62 PageTransition transition_type_; 68 PageTransition transition_type_;
63 bool should_replace_current_entry_; 69 bool should_replace_current_entry_;
64 int transferred_request_child_id_; 70 int transferred_request_child_id_;
65 int transferred_request_request_id_; 71 int transferred_request_request_id_;
66 72
67 DISALLOW_COPY_AND_ASSIGN(RequestExtraData); 73 DISALLOW_COPY_AND_ASSIGN(RequestExtraData);
68 }; 74 };
69 75
70 } // namespace content 76 } // namespace content
71 77
72 #endif // CONTENT_CHILD_REQUEST_EXTRA_DATA_H_ 78 #endif // CONTENT_CHILD_REQUEST_EXTRA_DATA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698