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

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

Issue 847883002: Reland "Throttle resource message requests during user interaction" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tweak Created 5 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
« no previous file with comments | « no previous file | content/content_renderer.gypi » ('j') | content/renderer/render_thread_impl.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 // Indicates the priority of the specified request changed. 84 // Indicates the priority of the specified request changed.
85 void DidChangePriority(int request_id, 85 void DidChangePriority(int request_id,
86 net::RequestPriority new_priority, 86 net::RequestPriority new_priority,
87 int intra_priority_value); 87 int intra_priority_value);
88 88
89 // The provided data receiver will receive incoming resource data rather 89 // The provided data receiver will receive incoming resource data rather
90 // than the resource bridge. 90 // than the resource bridge.
91 bool AttachThreadedDataReceiver( 91 bool AttachThreadedDataReceiver(
92 int request_id, blink::WebThreadedDataReceiver* threaded_data_receiver); 92 int request_id, blink::WebThreadedDataReceiver* threaded_data_receiver);
93 93
94 void set_message_sender(IPC::Sender* sender) {
95 DCHECK(sender);
96 DCHECK(pending_requests_.empty());
97 message_sender_ = sender;
98 }
99
94 IPC::Sender* message_sender() const { return message_sender_; } 100 IPC::Sender* message_sender() const { return message_sender_; }
95 101
96 // This does not take ownership of the delegate. It is expected that the 102 // This does not take ownership of the delegate. It is expected that the
97 // delegate have a longer lifetime than the ResourceDispatcher. 103 // delegate have a longer lifetime than the ResourceDispatcher.
98 void set_delegate(ResourceDispatcherDelegate* delegate) { 104 void set_delegate(ResourceDispatcherDelegate* delegate) {
99 delegate_ = delegate; 105 delegate_ = delegate;
100 } 106 }
101 107
102 // Remembers IO thread timestamp for next resource message. 108 // Remembers IO thread timestamp for next resource message.
103 void set_io_timestamp(base::TimeTicks io_timestamp) { 109 void set_io_timestamp(base::TimeTicks io_timestamp) {
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_; 232 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_;
227 233
228 base::WeakPtrFactory<ResourceDispatcher> weak_factory_; 234 base::WeakPtrFactory<ResourceDispatcher> weak_factory_;
229 235
230 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcher); 236 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcher);
231 }; 237 };
232 238
233 } // namespace content 239 } // namespace content
234 240
235 #endif // CONTENT_CHILD_RESOURCE_DISPATCHER_H_ 241 #endif // CONTENT_CHILD_RESOURCE_DISPATCHER_H_
OLDNEW
« no previous file with comments | « no previous file | content/content_renderer.gypi » ('j') | content/renderer/render_thread_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698