OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/browser_render_process_host.h" | 8 #include "content/browser/renderer_host/browser_render_process_host.h" |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
407 content::GetContentClient()->browser()->GetResourceDispatcherHost(), | 407 content::GetContentClient()->browser()->GetResourceDispatcherHost(), |
408 NewCallbackWithReturnValue( | 408 NewCallbackWithReturnValue( |
409 widget_helper_.get(), &RenderWidgetHelper::GetNextRoutingID))); | 409 widget_helper_.get(), &RenderWidgetHelper::GetNextRoutingID))); |
410 | 410 |
411 #if defined(ENABLE_P2P_APIS) | 411 #if defined(ENABLE_P2P_APIS) |
412 channel_->AddFilter(new content::P2PSocketDispatcherHost( | 412 channel_->AddFilter(new content::P2PSocketDispatcherHost( |
413 &browser_context()->GetResourceContext())); | 413 &browser_context()->GetResourceContext())); |
414 #endif | 414 #endif |
415 | 415 |
416 channel_->AddFilter(new TraceMessageFilter()); | 416 channel_->AddFilter(new TraceMessageFilter()); |
417 channel_->AddFilter(new ResolveProxyMsgHelper(NULL)); | 417 channel_->AddFilter(new ResolveProxyMsgHelper( |
| 418 browser_context()->GetRequestContextForRenderProcess(id()))); |
418 channel_->AddFilter(new QuotaDispatcherHost( | 419 channel_->AddFilter(new QuotaDispatcherHost( |
419 id(), browser_context()->GetQuotaManager(), | 420 id(), browser_context()->GetQuotaManager(), |
420 content::GetContentClient()->browser()->CreateQuotaPermissionContext())); | 421 content::GetContentClient()->browser()->CreateQuotaPermissionContext())); |
421 } | 422 } |
422 | 423 |
423 int BrowserRenderProcessHost::GetNextRoutingID() { | 424 int BrowserRenderProcessHost::GetNextRoutingID() { |
424 return widget_helper_->GetNextRoutingID(); | 425 return widget_helper_->GetNextRoutingID(); |
425 } | 426 } |
426 | 427 |
427 void BrowserRenderProcessHost::CancelResourceRequests(int render_widget_id) { | 428 void BrowserRenderProcessHost::CancelResourceRequests(int render_widget_id) { |
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
929 void BrowserRenderProcessHost::OnRevealFolderInOS(const FilePath& path) { | 930 void BrowserRenderProcessHost::OnRevealFolderInOS(const FilePath& path) { |
930 // Only honor the request if appropriate persmissions are granted. | 931 // Only honor the request if appropriate persmissions are granted. |
931 if (ChildProcessSecurityPolicy::GetInstance()->CanReadFile(id(), path)) | 932 if (ChildProcessSecurityPolicy::GetInstance()->CanReadFile(id(), path)) |
932 content::GetContentClient()->browser()->OpenItem(path); | 933 content::GetContentClient()->browser()->OpenItem(path); |
933 } | 934 } |
934 | 935 |
935 void BrowserRenderProcessHost::OnSavedPageAsMHTML(int job_id, bool success) { | 936 void BrowserRenderProcessHost::OnSavedPageAsMHTML(int job_id, bool success) { |
936 content::GetContentClient()->browser()->GetMHTMLGenerationManager()-> | 937 content::GetContentClient()->browser()->GetMHTMLGenerationManager()-> |
937 MHTMLGenerated(job_id, success); | 938 MHTMLGenerated(job_id, success); |
938 } | 939 } |
OLD | NEW |