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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 int route_id, | 46 int route_id, |
47 int origin_pid, | 47 int origin_pid, |
48 int request_id, | 48 int request_id, |
49 bool is_main_frame, | 49 bool is_main_frame, |
50 int64 frame_id, | 50 int64 frame_id, |
51 bool parent_is_main_frame, | 51 bool parent_is_main_frame, |
52 int64 parent_frame_id, | 52 int64 parent_frame_id, |
53 ResourceType::Type resource_type, | 53 ResourceType::Type resource_type, |
54 PageTransition transition_type, | 54 PageTransition transition_type, |
55 bool is_download, | 55 bool is_download, |
| 56 bool is_stream, |
56 bool allow_download, | 57 bool allow_download, |
57 bool has_user_gesture, | 58 bool has_user_gesture, |
58 WebKit::WebReferrerPolicy referrer_policy, | 59 WebKit::WebReferrerPolicy referrer_policy, |
59 ResourceContext* context); | 60 ResourceContext* context); |
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; |
65 virtual int GetRouteID() const OVERRIDE; | 66 virtual int GetRouteID() const OVERRIDE; |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 return process_type_; | 105 return process_type_; |
105 } | 106 } |
106 | 107 |
107 // Downloads are allowed only as a top level request. | 108 // Downloads are allowed only as a top level request. |
108 bool allow_download() const { return allow_download_; } | 109 bool allow_download() const { return allow_download_; } |
109 | 110 |
110 // Whether this is a download. | 111 // Whether this is a download. |
111 bool is_download() const { return is_download_; } | 112 bool is_download() const { return is_download_; } |
112 void set_is_download(bool download) { is_download_ = download; } | 113 void set_is_download(bool download) { is_download_ = download; } |
113 | 114 |
| 115 // Whether this is a stream. |
| 116 bool is_stream() const { return is_stream_; } |
| 117 void set_is_stream(bool stream) { is_stream_ = stream; } |
| 118 |
114 void set_was_ignored_by_handler(bool value) { | 119 void set_was_ignored_by_handler(bool value) { |
115 was_ignored_by_handler_ = value; | 120 was_ignored_by_handler_ = value; |
116 } | 121 } |
117 | 122 |
118 // The approximate in-memory size (bytes) that we credited this request | 123 // The approximate in-memory size (bytes) that we credited this request |
119 // as consuming in |outstanding_requests_memory_cost_map_|. | 124 // as consuming in |outstanding_requests_memory_cost_map_|. |
120 int memory_cost() const { return memory_cost_; } | 125 int memory_cost() const { return memory_cost_; } |
121 void set_memory_cost(int cost) { memory_cost_ = cost; } | 126 void set_memory_cost(int cost) { memory_cost_ = cost; } |
122 | 127 |
123 // We hold a reference to the requested blob data to ensure it doesn't | 128 // We hold a reference to the requested blob data to ensure it doesn't |
(...skipping 11 matching lines...) Expand all Loading... |
135 ProcessType process_type_; | 140 ProcessType process_type_; |
136 int child_id_; | 141 int child_id_; |
137 int route_id_; | 142 int route_id_; |
138 int origin_pid_; | 143 int origin_pid_; |
139 int request_id_; | 144 int request_id_; |
140 bool is_main_frame_; | 145 bool is_main_frame_; |
141 int64 frame_id_; | 146 int64 frame_id_; |
142 bool parent_is_main_frame_; | 147 bool parent_is_main_frame_; |
143 int64 parent_frame_id_; | 148 int64 parent_frame_id_; |
144 bool is_download_; | 149 bool is_download_; |
| 150 bool is_stream_; |
145 bool allow_download_; | 151 bool allow_download_; |
146 bool has_user_gesture_; | 152 bool has_user_gesture_; |
147 bool was_ignored_by_handler_; | 153 bool was_ignored_by_handler_; |
148 ResourceType::Type resource_type_; | 154 ResourceType::Type resource_type_; |
149 PageTransition transition_type_; | 155 PageTransition transition_type_; |
150 int memory_cost_; | 156 int memory_cost_; |
151 scoped_refptr<webkit_blob::BlobData> requested_blob_data_; | 157 scoped_refptr<webkit_blob::BlobData> requested_blob_data_; |
152 WebKit::WebReferrerPolicy referrer_policy_; | 158 WebKit::WebReferrerPolicy referrer_policy_; |
153 ResourceContext* context_; | 159 ResourceContext* context_; |
154 | 160 |
155 DISALLOW_COPY_AND_ASSIGN(ResourceRequestInfoImpl); | 161 DISALLOW_COPY_AND_ASSIGN(ResourceRequestInfoImpl); |
156 }; | 162 }; |
157 | 163 |
158 } // namespace content | 164 } // namespace content |
159 | 165 |
160 #endif // CONTENT_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_ | 166 #endif // CONTENT_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_ |
OLD | NEW |