OLD | NEW |
---|---|
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 #if defined(OS_WIN) | 10 #if defined(OS_WIN) |
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
308 base::PLATFORM_FILE_READ | base::PLATFORM_FILE_WRITE | | 308 base::PLATFORM_FILE_READ | base::PLATFORM_FILE_WRITE | |
309 base::PLATFORM_FILE_WRITE_ATTRIBUTES | base::PLATFORM_FILE_ENUMERATE); | 309 base::PLATFORM_FILE_WRITE_ATTRIBUTES | base::PLATFORM_FILE_ENUMERATE); |
310 // This is so that we can rename the old sandbox out of the way so that we | 310 // This is so that we can rename the old sandbox out of the way so that we |
311 // know we've taken care of it. | 311 // know we've taken care of it. |
312 ChildProcessSecurityPolicy::GetInstance()->GrantPermissionsForFile( | 312 ChildProcessSecurityPolicy::GetInstance()->GrantPermissionsForFile( |
313 GetID(), browser_context->GetPath().Append( | 313 GetID(), browser_context->GetPath().Append( |
314 fileapi::SandboxMountPointProvider::kRenamedOldFileSystemDirectory), | 314 fileapi::SandboxMountPointProvider::kRenamedOldFileSystemDirectory), |
315 base::PLATFORM_FILE_CREATE | base::PLATFORM_FILE_CREATE_ALWAYS | | 315 base::PLATFORM_FILE_CREATE | base::PLATFORM_FILE_CREATE_ALWAYS | |
316 base::PLATFORM_FILE_WRITE); | 316 base::PLATFORM_FILE_WRITE); |
317 | 317 |
318 CHECK(!content::ExitedMainMessageLoop()); | 318 extern bool g_exited_main_message_loop; |
jam
2012/02/02 21:43:36
nit: usually i see externs at the top of the file
Marshall
2012/02/02 22:02:10
Done.
| |
319 CHECK(!g_exited_main_message_loop); | |
319 RegisterHost(GetID(), this); | 320 RegisterHost(GetID(), this); |
320 g_all_hosts.Get().set_check_on_null_data(true); | 321 g_all_hosts.Get().set_check_on_null_data(true); |
321 // Initialize |child_process_activity_time_| to a reasonable value. | 322 // Initialize |child_process_activity_time_| to a reasonable value. |
322 mark_child_process_activity_time(); | 323 mark_child_process_activity_time(); |
323 // Note: When we create the RenderProcessHostImpl, it's technically | 324 // Note: When we create the RenderProcessHostImpl, it's technically |
324 // backgrounded, because it has no visible listeners. But the process | 325 // backgrounded, because it has no visible listeners. But the process |
325 // doesn't actually exist yet, so we'll Background it later, after | 326 // doesn't actually exist yet, so we'll Background it later, after |
326 // creation. | 327 // creation. |
327 } | 328 } |
328 | 329 |
(...skipping 966 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1295 void RenderProcessHostImpl::OnRevealFolderInOS(const FilePath& path) { | 1296 void RenderProcessHostImpl::OnRevealFolderInOS(const FilePath& path) { |
1296 // Only honor the request if appropriate persmissions are granted. | 1297 // Only honor the request if appropriate persmissions are granted. |
1297 if (ChildProcessSecurityPolicy::GetInstance()->CanReadFile(GetID(), path)) | 1298 if (ChildProcessSecurityPolicy::GetInstance()->CanReadFile(GetID(), path)) |
1298 content::GetContentClient()->browser()->OpenItem(path); | 1299 content::GetContentClient()->browser()->OpenItem(path); |
1299 } | 1300 } |
1300 | 1301 |
1301 void RenderProcessHostImpl::OnSavedPageAsMHTML(int job_id, int64 data_size) { | 1302 void RenderProcessHostImpl::OnSavedPageAsMHTML(int job_id, int64 data_size) { |
1302 content::GetContentClient()->browser()->GetMHTMLGenerationManager()-> | 1303 content::GetContentClient()->browser()->GetMHTMLGenerationManager()-> |
1303 MHTMLGenerated(job_id, data_size); | 1304 MHTMLGenerated(job_id, data_size); |
1304 } | 1305 } |
OLD | NEW |