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

Side by Side Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 11270027: Add a ResourceScheduler to ResourceDispatcherHost. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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 // Represents the browser side of the browser <--> renderer communication 5 // Represents the browser side of the browser <--> renderer communication
6 // channel. There will be one RenderProcessHost per renderer process. 6 // channel. There will be one RenderProcessHost per renderer process.
7 7
8 #include "content/browser/renderer_host/render_process_host_impl.h" 8 #include "content/browser/renderer_host/render_process_host_impl.h"
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 #include "content/browser/renderer_host/media/video_capture_host.h" 69 #include "content/browser/renderer_host/media/video_capture_host.h"
70 #include "content/browser/renderer_host/p2p/socket_dispatcher_host.h" 70 #include "content/browser/renderer_host/p2p/socket_dispatcher_host.h"
71 #include "content/browser/renderer_host/pepper/pepper_file_message_filter.h" 71 #include "content/browser/renderer_host/pepper/pepper_file_message_filter.h"
72 #include "content/browser/renderer_host/pepper/pepper_message_filter.h" 72 #include "content/browser/renderer_host/pepper/pepper_message_filter.h"
73 #include "content/browser/renderer_host/quota_dispatcher_host.h" 73 #include "content/browser/renderer_host/quota_dispatcher_host.h"
74 #include "content/browser/renderer_host/render_message_filter.h" 74 #include "content/browser/renderer_host/render_message_filter.h"
75 #include "content/browser/renderer_host/render_view_host_delegate.h" 75 #include "content/browser/renderer_host/render_view_host_delegate.h"
76 #include "content/browser/renderer_host/render_view_host_impl.h" 76 #include "content/browser/renderer_host/render_view_host_impl.h"
77 #include "content/browser/renderer_host/render_widget_helper.h" 77 #include "content/browser/renderer_host/render_widget_helper.h"
78 #include "content/browser/renderer_host/resource_message_filter.h" 78 #include "content/browser/renderer_host/resource_message_filter.h"
79 #include "content/browser/renderer_host/resource_scheduler.h"
80 #include "content/browser/renderer_host/resource_scheduler_filter.h"
79 #include "content/browser/renderer_host/socket_stream_dispatcher_host.h" 81 #include "content/browser/renderer_host/socket_stream_dispatcher_host.h"
80 #include "content/browser/renderer_host/text_input_client_message_filter.h" 82 #include "content/browser/renderer_host/text_input_client_message_filter.h"
81 #include "content/browser/resolve_proxy_msg_helper.h" 83 #include "content/browser/resolve_proxy_msg_helper.h"
82 #include "content/browser/storage_partition_impl.h" 84 #include "content/browser/storage_partition_impl.h"
83 #include "content/browser/speech/input_tag_speech_dispatcher_host.h" 85 #include "content/browser/speech/input_tag_speech_dispatcher_host.h"
84 #include "content/browser/speech/speech_recognition_dispatcher_host.h" 86 #include "content/browser/speech/speech_recognition_dispatcher_host.h"
85 #include "content/browser/trace_message_filter.h" 87 #include "content/browser/trace_message_filter.h"
86 #include "content/browser/worker_host/worker_storage_partition.h" 88 #include "content/browser/worker_host/worker_storage_partition.h"
87 #include "content/browser/worker_host/worker_message_filter.h" 89 #include "content/browser/worker_host/worker_message_filter.h"
88 #include "content/common/child_process_host_impl.h" 90 #include "content/common/child_process_host_impl.h"
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 514
513 fast_shutdown_started_ = false; 515 fast_shutdown_started_ = false;
514 } 516 }
515 517
516 is_initialized_ = true; 518 is_initialized_ = true;
517 return true; 519 return true;
518 } 520 }
519 521
520 void RenderProcessHostImpl::CreateMessageFilters() { 522 void RenderProcessHostImpl::CreateMessageFilters() {
521 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 523 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
524 channel_->AddFilter(new ResourceSchedulerFilter(GetID()));
522 MediaObserver* media_observer = 525 MediaObserver* media_observer =
523 GetContentClient()->browser()->GetMediaObserver(); 526 GetContentClient()->browser()->GetMediaObserver();
524 scoped_refptr<RenderMessageFilter> render_message_filter( 527 scoped_refptr<RenderMessageFilter> render_message_filter(
525 new RenderMessageFilter( 528 new RenderMessageFilter(
526 GetID(), 529 GetID(),
527 PluginServiceImpl::GetInstance(), 530 PluginServiceImpl::GetInstance(),
528 GetBrowserContext(), 531 GetBrowserContext(),
529 GetBrowserContext()->GetRequestContextForRenderProcess(GetID()), 532 GetBrowserContext()->GetRequestContextForRenderProcess(GetID()),
530 widget_helper_, 533 widget_helper_,
531 media_observer, 534 media_observer,
(...skipping 911 matching lines...) Expand 10 before | Expand all | Expand 10 after
1443 child_process_launcher_.reset(); 1446 child_process_launcher_.reset();
1444 channel_.reset(); 1447 channel_.reset();
1445 gpu_message_filter_ = NULL; 1448 gpu_message_filter_ = NULL;
1446 1449
1447 IDMap<RenderWidgetHost>::iterator iter(&render_widget_hosts_); 1450 IDMap<RenderWidgetHost>::iterator iter(&render_widget_hosts_);
1448 while (!iter.IsAtEnd()) { 1451 while (!iter.IsAtEnd()) {
1449 RenderWidgetHostImpl::From(iter.GetCurrentValue())->OnMessageReceived( 1452 RenderWidgetHostImpl::From(iter.GetCurrentValue())->OnMessageReceived(
1450 ViewHostMsg_RenderViewGone(iter.GetCurrentKey(), 1453 ViewHostMsg_RenderViewGone(iter.GetCurrentKey(),
1451 static_cast<int>(status), 1454 static_cast<int>(status),
1452 exit_code)); 1455 exit_code));
1456 ResourceDispatcherHostImpl::Get()->scheduler()->OnDestroy(
1457 GetID(), iter.GetCurrentKey());
1453 iter.Advance(); 1458 iter.Advance();
1454 } 1459 }
1455 1460
1456 ClearTransportDIBCache(); 1461 ClearTransportDIBCache();
1457 1462
1458 // this object is not deleted at this point and may be reused later. 1463 // this object is not deleted at this point and may be reused later.
1459 // TODO(darin): clean this up 1464 // TODO(darin): clean this up
1460 } 1465 }
1461 1466
1462 int RenderProcessHostImpl::GetActiveViewCount() { 1467 int RenderProcessHostImpl::GetActiveViewCount() {
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
1582 const gfx::Size& size, 1587 const gfx::Size& size,
1583 int32 gpu_process_host_id) { 1588 int32 gpu_process_host_id) {
1584 TRACE_EVENT0("renderer_host", 1589 TRACE_EVENT0("renderer_host",
1585 "RenderWidgetHostImpl::OnCompositorSurfaceBuffersSwappedNoHost"); 1590 "RenderWidgetHostImpl::OnCompositorSurfaceBuffersSwappedNoHost");
1586 RenderWidgetHostImpl::AcknowledgeBufferPresent(route_id, 1591 RenderWidgetHostImpl::AcknowledgeBufferPresent(route_id,
1587 gpu_process_host_id, 1592 gpu_process_host_id,
1588 0); 1593 0);
1589 } 1594 }
1590 1595
1591 } // namespace content 1596 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698