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

Side by Side Diff: content/browser/loader/resource_dispatcher_host_impl.h

Issue 562273008: Add audio signal to the ResourceScheduler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix. Created 6 years, 2 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
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 // This is the browser side of the resource dispatcher, it receives requests 5 // This is the browser side of the resource dispatcher, it receives requests
6 // from the child process (i.e. [Renderer, Plugin, Worker]ProcessHost), and 6 // from the child process (i.e. [Renderer, Plugin, Worker]ProcessHost), and
7 // dispatches them to URLRequests. It then forwards the messages from the 7 // dispatches them to URLRequests. It then forwards the messages from the
8 // URLRequests back to the correct process for handling. 8 // URLRequests back to the correct process for handling.
9 // 9 //
10 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading 10 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 157
158 // The average private bytes increase of the browser for each new pending 158 // The average private bytes increase of the browser for each new pending
159 // request. Experimentally obtained. 159 // request. Experimentally obtained.
160 static const int kAvgBytesPerOutstandingRequest = 4400; 160 static const int kAvgBytesPerOutstandingRequest = 4400;
161 161
162 SaveFileManager* save_file_manager() const { 162 SaveFileManager* save_file_manager() const {
163 return save_file_manager_.get(); 163 return save_file_manager_.get();
164 } 164 }
165 165
166 // Called when a RenderViewHost is created. 166 // Called when a RenderViewHost is created.
167 void OnRenderViewHostCreated(int child_id, int route_id, bool is_visible); 167 void OnRenderViewHostCreated(int child_id,
168 int route_id,
169 bool is_visible,
170 bool is_audible);
168 171
169 // Called when a RenderViewHost is deleted. 172 // Called when a RenderViewHost is deleted.
170 void OnRenderViewHostDeleted(int child_id, int route_id); 173 void OnRenderViewHostDeleted(int child_id, int route_id);
171 174
172 // Called when a RenderViewHost starts or stops loading. 175 // Called when a RenderViewHost starts or stops loading.
173 void OnRenderViewHostSetIsLoading(int child_id, 176 void OnRenderViewHostSetIsLoading(int child_id,
174 int route_id, 177 int route_id,
175 bool is_loading); 178 bool is_loading);
176 179
177 // Called when a RenderViewHost is hidden. 180 // Called when a RenderViewHost is hidden.
178 void OnRenderViewHostWasHidden(int child_id, int route_id); 181 void OnRenderViewHostWasHidden(int child_id, int route_id);
179 182
180 // Called when a RenderViewHost is shown. 183 // Called when a RenderViewHost is shown.
181 void OnRenderViewHostWasShown(int child_id, int route_id); 184 void OnRenderViewHostWasShown(int child_id, int route_id);
182 185
186 // Called when an AudioRenderHost starts or stops playing.
187 void OnAudioRenderHostStreamStateChanged(int child_id,
188 int route_id,
189 bool is_playing);
190
183 // Force cancels any pending requests for the given process. 191 // Force cancels any pending requests for the given process.
184 void CancelRequestsForProcess(int child_id); 192 void CancelRequestsForProcess(int child_id);
185 193
186 void OnUserGesture(WebContentsImpl* contents); 194 void OnUserGesture(WebContentsImpl* contents);
187 195
188 // Retrieves a net::URLRequest. Must be called from the IO thread. 196 // Retrieves a net::URLRequest. Must be called from the IO thread.
189 net::URLRequest* GetURLRequest(const GlobalRequestID& request_id); 197 net::URLRequest* GetURLRequest(const GlobalRequestID& request_id);
190 198
191 void RemovePendingRequest(int child_id, int request_id); 199 void RemovePendingRequest(int child_id, int request_id);
192 200
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 DelegateMap delegate_map_; 544 DelegateMap delegate_map_;
537 545
538 scoped_ptr<ResourceScheduler> scheduler_; 546 scoped_ptr<ResourceScheduler> scheduler_;
539 547
540 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl); 548 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl);
541 }; 549 };
542 550
543 } // namespace content 551 } // namespace content
544 552
545 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_ 553 #endif // CONTENT_BROWSER_LOADER_RESOURCE_DISPATCHER_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698