OLD | NEW |
---|---|
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_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_ |
6 #define CONTENT_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_ | 6 #define CONTENT_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
45 int route_id, | 45 int route_id, |
46 int origin_pid, | 46 int origin_pid, |
47 int request_id, | 47 int request_id, |
48 bool is_main_frame, | 48 bool is_main_frame, |
49 int64 frame_id, | 49 int64 frame_id, |
50 bool parent_is_main_frame, | 50 bool parent_is_main_frame, |
51 int64 parent_frame_id, | 51 int64 parent_frame_id, |
52 ResourceType::Type resource_type, | 52 ResourceType::Type resource_type, |
53 PageTransition transition_type, | 53 PageTransition transition_type, |
54 bool is_download, | 54 bool is_download, |
55 bool is_stream, | |
kinuko
2013/03/13 11:05:59
nit: it's probably ok since we already have is_dow
Zachary Kuznia
2013/03/13 11:13:10
Would an enum be preferable?
| |
55 bool allow_download, | 56 bool allow_download, |
56 bool has_user_gesture, | 57 bool has_user_gesture, |
57 WebKit::WebReferrerPolicy referrer_policy, | 58 WebKit::WebReferrerPolicy referrer_policy, |
58 ResourceContext* context, | 59 ResourceContext* context, |
59 bool is_async); | 60 bool is_async); |
60 virtual ~ResourceRequestInfoImpl(); | 61 virtual ~ResourceRequestInfoImpl(); |
61 | 62 |
62 // ResourceRequestInfo implementation: | 63 // ResourceRequestInfo implementation: |
63 virtual ResourceContext* GetContext() const OVERRIDE; | 64 virtual ResourceContext* GetContext() const OVERRIDE; |
64 virtual int GetChildID() const OVERRIDE; | 65 virtual int GetChildID() const OVERRIDE; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
96 return process_type_; | 97 return process_type_; |
97 } | 98 } |
98 | 99 |
99 // Downloads are allowed only as a top level request. | 100 // Downloads are allowed only as a top level request. |
100 bool allow_download() const { return allow_download_; } | 101 bool allow_download() const { return allow_download_; } |
101 | 102 |
102 // Whether this is a download. | 103 // Whether this is a download. |
103 bool is_download() const { return is_download_; } | 104 bool is_download() const { return is_download_; } |
104 void set_is_download(bool download) { is_download_ = download; } | 105 void set_is_download(bool download) { is_download_ = download; } |
105 | 106 |
107 // Whether this is a stream. | |
108 bool is_stream() const { return is_stream_; } | |
109 void set_is_stream(bool stream) { is_stream_ = stream; } | |
110 | |
106 void set_was_ignored_by_handler(bool value) { | 111 void set_was_ignored_by_handler(bool value) { |
107 was_ignored_by_handler_ = value; | 112 was_ignored_by_handler_ = value; |
108 } | 113 } |
109 | 114 |
110 // The approximate in-memory size (bytes) that we credited this request | 115 // The approximate in-memory size (bytes) that we credited this request |
111 // as consuming in |outstanding_requests_memory_cost_map_|. | 116 // as consuming in |outstanding_requests_memory_cost_map_|. |
112 int memory_cost() const { return memory_cost_; } | 117 int memory_cost() const { return memory_cost_; } |
113 void set_memory_cost(int cost) { memory_cost_ = cost; } | 118 void set_memory_cost(int cost) { memory_cost_ = cost; } |
114 | 119 |
115 // We hold a reference to the requested blob data to ensure it doesn't | 120 // We hold a reference to the requested blob data to ensure it doesn't |
(...skipping 10 matching lines...) Expand all Loading... | |
126 ProcessType process_type_; | 131 ProcessType process_type_; |
127 int child_id_; | 132 int child_id_; |
128 int route_id_; | 133 int route_id_; |
129 int origin_pid_; | 134 int origin_pid_; |
130 int request_id_; | 135 int request_id_; |
131 bool is_main_frame_; | 136 bool is_main_frame_; |
132 int64 frame_id_; | 137 int64 frame_id_; |
133 bool parent_is_main_frame_; | 138 bool parent_is_main_frame_; |
134 int64 parent_frame_id_; | 139 int64 parent_frame_id_; |
135 bool is_download_; | 140 bool is_download_; |
141 bool is_stream_; | |
136 bool allow_download_; | 142 bool allow_download_; |
137 bool has_user_gesture_; | 143 bool has_user_gesture_; |
138 bool was_ignored_by_handler_; | 144 bool was_ignored_by_handler_; |
139 ResourceType::Type resource_type_; | 145 ResourceType::Type resource_type_; |
140 PageTransition transition_type_; | 146 PageTransition transition_type_; |
141 int memory_cost_; | 147 int memory_cost_; |
142 scoped_refptr<webkit_blob::BlobData> requested_blob_data_; | 148 scoped_refptr<webkit_blob::BlobData> requested_blob_data_; |
143 WebKit::WebReferrerPolicy referrer_policy_; | 149 WebKit::WebReferrerPolicy referrer_policy_; |
144 ResourceContext* context_; | 150 ResourceContext* context_; |
145 bool is_async_; | 151 bool is_async_; |
146 | 152 |
147 DISALLOW_COPY_AND_ASSIGN(ResourceRequestInfoImpl); | 153 DISALLOW_COPY_AND_ASSIGN(ResourceRequestInfoImpl); |
148 }; | 154 }; |
149 | 155 |
150 } // namespace content | 156 } // namespace content |
151 | 157 |
152 #endif // CONTENT_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_ | 158 #endif // CONTENT_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_ |
OLD | NEW |