| 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 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 423 browser_context()->GetRequestContextForRenderProcess(id()))); | 423 browser_context()->GetRequestContextForRenderProcess(id()))); |
| 424 channel_->AddFilter(new QuotaDispatcherHost( | 424 channel_->AddFilter(new QuotaDispatcherHost( |
| 425 id(), browser_context()->GetQuotaManager(), | 425 id(), browser_context()->GetQuotaManager(), |
| 426 content::GetContentClient()->browser()->CreateQuotaPermissionContext())); | 426 content::GetContentClient()->browser()->CreateQuotaPermissionContext())); |
| 427 } | 427 } |
| 428 | 428 |
| 429 int BrowserRenderProcessHost::GetNextRoutingID() { | 429 int BrowserRenderProcessHost::GetNextRoutingID() { |
| 430 return widget_helper_->GetNextRoutingID(); | 430 return widget_helper_->GetNextRoutingID(); |
| 431 } | 431 } |
| 432 | 432 |
| 433 void BrowserRenderProcessHost::UpdateAndSendMaxPageID(int32 page_id) { |
| 434 if (page_id > max_page_id_) |
| 435 Send(new ViewMsg_SetNextPageID(page_id + 1)); |
| 436 UpdateMaxPageID(page_id); |
| 437 } |
| 438 |
| 433 void BrowserRenderProcessHost::CancelResourceRequests(int render_widget_id) { | 439 void BrowserRenderProcessHost::CancelResourceRequests(int render_widget_id) { |
| 434 widget_helper_->CancelResourceRequests(render_widget_id); | 440 widget_helper_->CancelResourceRequests(render_widget_id); |
| 435 } | 441 } |
| 436 | 442 |
| 437 void BrowserRenderProcessHost::CrossSiteSwapOutACK( | 443 void BrowserRenderProcessHost::CrossSiteSwapOutACK( |
| 438 const ViewMsg_SwapOut_Params& params) { | 444 const ViewMsg_SwapOut_Params& params) { |
| 439 widget_helper_->CrossSiteSwapOutACK(params); | 445 widget_helper_->CrossSiteSwapOutACK(params); |
| 440 } | 446 } |
| 441 | 447 |
| 442 bool BrowserRenderProcessHost::WaitForUpdateMsg( | 448 bool BrowserRenderProcessHost::WaitForUpdateMsg( |
| (...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 977 void BrowserRenderProcessHost::OnRevealFolderInOS(const FilePath& path) { | 983 void BrowserRenderProcessHost::OnRevealFolderInOS(const FilePath& path) { |
| 978 // Only honor the request if appropriate persmissions are granted. | 984 // Only honor the request if appropriate persmissions are granted. |
| 979 if (ChildProcessSecurityPolicy::GetInstance()->CanReadFile(id(), path)) | 985 if (ChildProcessSecurityPolicy::GetInstance()->CanReadFile(id(), path)) |
| 980 content::GetContentClient()->browser()->OpenItem(path); | 986 content::GetContentClient()->browser()->OpenItem(path); |
| 981 } | 987 } |
| 982 | 988 |
| 983 void BrowserRenderProcessHost::OnSavedPageAsMHTML(int job_id, int64 data_size) { | 989 void BrowserRenderProcessHost::OnSavedPageAsMHTML(int job_id, int64 data_size) { |
| 984 content::GetContentClient()->browser()->GetMHTMLGenerationManager()-> | 990 content::GetContentClient()->browser()->GetMHTMLGenerationManager()-> |
| 985 MHTMLGenerated(job_id, data_size); | 991 MHTMLGenerated(job_id, data_size); |
| 986 } | 992 } |
| OLD | NEW |