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

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

Issue 23583039: Convert a bunch of resource IPCs to be control messages. They didn't need to be routed. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: remove dcheck from RenderProcessHost instead Created 7 years, 3 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 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading 5 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading
6 6
7 #ifndef CONTENT_CHILD_RESOURCE_DISPATCHER_H_ 7 #ifndef CONTENT_CHILD_RESOURCE_DISPATCHER_H_
8 #define CONTENT_CHILD_RESOURCE_DISPATCHER_H_ 8 #define CONTENT_CHILD_RESOURCE_DISPATCHER_H_
9 9
10 #include <deque> 10 #include <deque>
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 ResourceType::Type resource_type, 47 ResourceType::Type resource_type,
48 int origin_pid, 48 int origin_pid,
49 const GURL& frame_origin, 49 const GURL& frame_origin,
50 const GURL& request_url); 50 const GURL& request_url);
51 51
52 // Removes a request from the pending_requests_ list, returning true if the 52 // Removes a request from the pending_requests_ list, returning true if the
53 // request was found and removed. 53 // request was found and removed.
54 bool RemovePendingRequest(int request_id); 54 bool RemovePendingRequest(int request_id);
55 55
56 // Cancels a request in the pending_requests_ list. 56 // Cancels a request in the pending_requests_ list.
57 void CancelPendingRequest(int routing_id, int request_id); 57 void CancelPendingRequest(int request_id);
58 58
59 IPC::Sender* message_sender() const { 59 IPC::Sender* message_sender() const {
60 return message_sender_; 60 return message_sender_;
61 } 61 }
62 62
63 // Toggles the is_deferred attribute for the specified request. 63 // Toggles the is_deferred attribute for the specified request.
64 void SetDefersLoading(int request_id, bool value); 64 void SetDefersLoading(int request_id, bool value);
65 65
66 // Indicates the priority of the specified request changed. 66 // Indicates the priority of the specified request changed.
67 void DidChangePriority(int routing_id, int request_id, 67 void DidChangePriority(int routing_id, int request_id,
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 118
119 // Helper to lookup the info based on the request_id. 119 // Helper to lookup the info based on the request_id.
120 // May return NULL if the request as been canceled from the client side. 120 // May return NULL if the request as been canceled from the client side.
121 PendingRequestInfo* GetPendingRequestInfo(int request_id); 121 PendingRequestInfo* GetPendingRequestInfo(int request_id);
122 122
123 // Follows redirect, if any, for the given request. 123 // Follows redirect, if any, for the given request.
124 void FollowPendingRedirect(int request_id, PendingRequestInfo& request_info); 124 void FollowPendingRedirect(int request_id, PendingRequestInfo& request_info);
125 125
126 // Message response handlers, called by the message handler for this process. 126 // Message response handlers, called by the message handler for this process.
127 void OnUploadProgress( 127 void OnUploadProgress(
128 const IPC::Message& message,
129 int request_id, 128 int request_id,
130 int64 position, 129 int64 position,
131 int64 size); 130 int64 size);
132 void OnReceivedResponse(int request_id, const ResourceResponseHead&); 131 void OnReceivedResponse(int request_id, const ResourceResponseHead&);
133 void OnReceivedCachedMetadata(int request_id, const std::vector<char>& data); 132 void OnReceivedCachedMetadata(int request_id, const std::vector<char>& data);
134 void OnReceivedRedirect( 133 void OnReceivedRedirect(
135 const IPC::Message& message,
136 int request_id, 134 int request_id,
137 const GURL& new_url, 135 const GURL& new_url,
138 const ResourceResponseHead& response_head); 136 const ResourceResponseHead& response_head);
139 void OnSetDataBuffer( 137 void OnSetDataBuffer(
140 const IPC::Message& message,
141 int request_id, 138 int request_id,
142 base::SharedMemoryHandle shm_handle, 139 base::SharedMemoryHandle shm_handle,
143 int shm_size, 140 int shm_size,
144 base::ProcessId renderer_pid); 141 base::ProcessId renderer_pid);
145 void OnReceivedData( 142 void OnReceivedData(
146 const IPC::Message& message,
147 int request_id, 143 int request_id,
148 int data_offset, 144 int data_offset,
149 int data_length, 145 int data_length,
150 int encoded_data_length); 146 int encoded_data_length);
151 void OnDownloadedData( 147 void OnDownloadedData(
152 const IPC::Message& message,
153 int request_id, 148 int request_id,
154 int data_len, 149 int data_len,
155 int encoded_data_length); 150 int encoded_data_length);
156 void OnRequestComplete( 151 void OnRequestComplete(
157 int request_id, 152 int request_id,
158 int error_code, 153 int error_code,
159 bool was_ignored_by_handler, 154 bool was_ignored_by_handler,
160 const std::string& security_info, 155 const std::string& security_info,
161 const base::TimeTicks& completion_time); 156 const base::TimeTicks& completion_time);
162 157
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 201
207 // IO thread timestamp for ongoing IPC message. 202 // IO thread timestamp for ongoing IPC message.
208 base::TimeTicks io_timestamp_; 203 base::TimeTicks io_timestamp_;
209 204
210 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcher); 205 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcher);
211 }; 206 };
212 207
213 } // namespace content 208 } // namespace content
214 209
215 #endif // CONTENT_CHILD_RESOURCE_DISPATCHER_H_ 210 #endif // CONTENT_CHILD_RESOURCE_DISPATCHER_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.cc ('k') | content/child/resource_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698