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 20 matching lines...) Expand all Loading... | |
31 #include "base/path_service.h" | 31 #include "base/path_service.h" |
32 #include "base/platform_file.h" | 32 #include "base/platform_file.h" |
33 #include "base/process_util.h" | 33 #include "base/process_util.h" |
34 #include "base/rand_util.h" | 34 #include "base/rand_util.h" |
35 #include "base/stl_util.h" | 35 #include "base/stl_util.h" |
36 #include "base/string_util.h" | 36 #include "base/string_util.h" |
37 #include "base/sys_info.h" | 37 #include "base/sys_info.h" |
38 #include "base/threading/thread.h" | 38 #include "base/threading/thread.h" |
39 #include "base/threading/thread_restrictions.h" | 39 #include "base/threading/thread_restrictions.h" |
40 #include "base/tracked_objects.h" | 40 #include "base/tracked_objects.h" |
41 #include "chrome/common/chrome_switches.h" | |
jam
2012/04/09 16:02:37
content can't include files from chrome, you'd see
asharif1
2012/04/09 23:26:35
Done.
| |
41 #include "content/browser/appcache/appcache_dispatcher_host.h" | 42 #include "content/browser/appcache/appcache_dispatcher_host.h" |
42 #include "content/browser/appcache/chrome_appcache_service.h" | 43 #include "content/browser/appcache/chrome_appcache_service.h" |
43 #include "content/browser/browser_main.h" | 44 #include "content/browser/browser_main.h" |
44 #include "content/browser/browser_main_loop.h" | 45 #include "content/browser/browser_main_loop.h" |
45 #include "content/browser/child_process_security_policy_impl.h" | 46 #include "content/browser/child_process_security_policy_impl.h" |
46 #include "content/browser/device_orientation/message_filter.h" | 47 #include "content/browser/device_orientation/message_filter.h" |
47 #include "content/browser/download/mhtml_generation_manager.h" | 48 #include "content/browser/download/mhtml_generation_manager.h" |
48 #include "content/browser/fileapi/chrome_blob_storage_context.h" | 49 #include "content/browser/fileapi/chrome_blob_storage_context.h" |
49 #include "content/browser/fileapi/fileapi_message_filter.h" | 50 #include "content/browser/fileapi/fileapi_message_filter.h" |
50 #include "content/browser/geolocation/geolocation_dispatcher_host.h" | 51 #include "content/browser/geolocation/geolocation_dispatcher_host.h" |
(...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
632 field_trial_states); | 633 field_trial_states); |
633 } | 634 } |
634 | 635 |
635 content::GetContentClient()->browser()->AppendExtraCommandLineSwitches( | 636 content::GetContentClient()->browser()->AppendExtraCommandLineSwitches( |
636 command_line, GetID()); | 637 command_line, GetID()); |
637 | 638 |
638 // Appending disable-gpu-feature switches due to software rendering list. | 639 // Appending disable-gpu-feature switches due to software rendering list. |
639 GpuDataManagerImpl* gpu_data_manager = GpuDataManagerImpl::GetInstance(); | 640 GpuDataManagerImpl* gpu_data_manager = GpuDataManagerImpl::GetInstance(); |
640 DCHECK(gpu_data_manager); | 641 DCHECK(gpu_data_manager); |
641 gpu_data_manager->AppendRendererCommandLine(command_line); | 642 gpu_data_manager->AppendRendererCommandLine(command_line); |
643 | |
644 if (CommandLine::ForCurrentProcess()-> | |
645 HasSwitch(switches::kEnableRendererCleanExit)) | |
646 command_line->AppendSwitch(switches::kEnableRendererCleanExit); | |
jam
2012/04/09 16:02:37
see the list a few lines down of switches to be co
asharif1
2012/04/09 23:26:35
Done.
| |
642 } | 647 } |
643 | 648 |
644 void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer( | 649 void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer( |
645 const CommandLine& browser_cmd, | 650 const CommandLine& browser_cmd, |
646 CommandLine* renderer_cmd) const { | 651 CommandLine* renderer_cmd) const { |
647 // Propagate the following switches to the renderer command line (along | 652 // Propagate the following switches to the renderer command line (along |
648 // with any associated values) if present in the browser command line. | 653 // with any associated values) if present in the browser command line. |
649 static const char* const kSwitchNames[] = { | 654 static const char* const kSwitchNames[] = { |
650 // We propagate the Chrome Frame command line here as well in case the | 655 // We propagate the Chrome Frame command line here as well in case the |
651 // renderer is not run in the sandbox. | 656 // renderer is not run in the sandbox. |
(...skipping 714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1366 void RenderProcessHostImpl::OnRevealFolderInOS(const FilePath& path) { | 1371 void RenderProcessHostImpl::OnRevealFolderInOS(const FilePath& path) { |
1367 // Only honor the request if appropriate persmissions are granted. | 1372 // Only honor the request if appropriate persmissions are granted. |
1368 if (ChildProcessSecurityPolicyImpl::GetInstance()->CanReadFile(GetID(), | 1373 if (ChildProcessSecurityPolicyImpl::GetInstance()->CanReadFile(GetID(), |
1369 path)) | 1374 path)) |
1370 content::GetContentClient()->browser()->OpenItem(path); | 1375 content::GetContentClient()->browser()->OpenItem(path); |
1371 } | 1376 } |
1372 | 1377 |
1373 void RenderProcessHostImpl::OnSavedPageAsMHTML(int job_id, int64 data_size) { | 1378 void RenderProcessHostImpl::OnSavedPageAsMHTML(int job_id, int64 data_size) { |
1374 MHTMLGenerationManager::GetInstance()->MHTMLGenerated(job_id, data_size); | 1379 MHTMLGenerationManager::GetInstance()->MHTMLGenerated(job_id, data_size); |
1375 } | 1380 } |
OLD | NEW |