| 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 15 matching lines...) Expand all Loading... |
| 26 #include "base/path_service.h" | 26 #include "base/path_service.h" |
| 27 #include "base/platform_file.h" | 27 #include "base/platform_file.h" |
| 28 #include "base/stl_util.h" | 28 #include "base/stl_util.h" |
| 29 #include "base/string_util.h" | 29 #include "base/string_util.h" |
| 30 #include "base/threading/thread.h" | 30 #include "base/threading/thread.h" |
| 31 #include "base/threading/thread_restrictions.h" | 31 #include "base/threading/thread_restrictions.h" |
| 32 #include "content/browser/appcache/appcache_dispatcher_host.h" | 32 #include "content/browser/appcache/appcache_dispatcher_host.h" |
| 33 #include "content/browser/browser_child_process_host.h" | 33 #include "content/browser/browser_child_process_host.h" |
| 34 #include "content/browser/browser_context.h" | 34 #include "content/browser/browser_context.h" |
| 35 #include "content/browser/child_process_security_policy.h" | 35 #include "content/browser/child_process_security_policy.h" |
| 36 #include "content/browser/content_browser_client.h" | |
| 37 #include "content/browser/device_orientation/message_filter.h" | 36 #include "content/browser/device_orientation/message_filter.h" |
| 38 #include "content/browser/download/mhtml_generation_manager.h" | 37 #include "content/browser/download/mhtml_generation_manager.h" |
| 39 #include "content/browser/file_system/file_system_dispatcher_host.h" | 38 #include "content/browser/file_system/file_system_dispatcher_host.h" |
| 40 #include "content/browser/geolocation/geolocation_dispatcher_host.h" | 39 #include "content/browser/geolocation/geolocation_dispatcher_host.h" |
| 41 #include "content/browser/gpu/gpu_data_manager.h" | 40 #include "content/browser/gpu/gpu_data_manager.h" |
| 42 #include "content/browser/gpu/gpu_process_host.h" | 41 #include "content/browser/gpu/gpu_process_host.h" |
| 43 #include "content/browser/in_process_webkit/dom_storage_message_filter.h" | 42 #include "content/browser/in_process_webkit/dom_storage_message_filter.h" |
| 44 #include "content/browser/in_process_webkit/indexed_db_dispatcher_host.h" | 43 #include "content/browser/in_process_webkit/indexed_db_dispatcher_host.h" |
| 45 #include "content/browser/mime_registry_message_filter.h" | 44 #include "content/browser/mime_registry_message_filter.h" |
| 46 #include "content/browser/plugin_service.h" | 45 #include "content/browser/plugin_service.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 71 #include "content/browser/user_metrics.h" | 70 #include "content/browser/user_metrics.h" |
| 72 #include "content/browser/worker_host/worker_message_filter.h" | 71 #include "content/browser/worker_host/worker_message_filter.h" |
| 73 #include "content/common/child_process_info.h" | 72 #include "content/common/child_process_info.h" |
| 74 #include "content/common/child_process_messages.h" | 73 #include "content/common/child_process_messages.h" |
| 75 #include "content/common/gpu/gpu_messages.h" | 74 #include "content/common/gpu/gpu_messages.h" |
| 76 #include "content/common/notification_service.h" | 75 #include "content/common/notification_service.h" |
| 77 #include "content/common/process_watcher.h" | 76 #include "content/common/process_watcher.h" |
| 78 #include "content/common/resource_messages.h" | 77 #include "content/common/resource_messages.h" |
| 79 #include "content/common/result_codes.h" | 78 #include "content/common/result_codes.h" |
| 80 #include "content/common/view_messages.h" | 79 #include "content/common/view_messages.h" |
| 80 #include "content/public/browser/content_browser_client.h" |
| 81 #include "content/public/common/content_switches.h" | 81 #include "content/public/common/content_switches.h" |
| 82 #include "content/renderer/render_process_impl.h" | 82 #include "content/renderer/render_process_impl.h" |
| 83 #include "content/renderer/render_thread_impl.h" | 83 #include "content/renderer/render_thread_impl.h" |
| 84 #include "ipc/ipc_logging.h" | 84 #include "ipc/ipc_logging.h" |
| 85 #include "ipc/ipc_platform_file.h" | 85 #include "ipc/ipc_platform_file.h" |
| 86 #include "ipc/ipc_switches.h" | 86 #include "ipc/ipc_switches.h" |
| 87 #include "media/base/media_switches.h" | 87 #include "media/base/media_switches.h" |
| 88 #include "net/url_request/url_request_context_getter.h" | 88 #include "net/url_request/url_request_context_getter.h" |
| 89 #include "ui/base/ui_base_switches.h" | 89 #include "ui/base/ui_base_switches.h" |
| 90 #include "ui/gfx/gl/gl_switches.h" | 90 #include "ui/gfx/gl/gl_switches.h" |
| (...skipping 891 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 982 void BrowserRenderProcessHost::OnRevealFolderInOS(const FilePath& path) { | 982 void BrowserRenderProcessHost::OnRevealFolderInOS(const FilePath& path) { |
| 983 // Only honor the request if appropriate persmissions are granted. | 983 // Only honor the request if appropriate persmissions are granted. |
| 984 if (ChildProcessSecurityPolicy::GetInstance()->CanReadFile(id(), path)) | 984 if (ChildProcessSecurityPolicy::GetInstance()->CanReadFile(id(), path)) |
| 985 content::GetContentClient()->browser()->OpenItem(path); | 985 content::GetContentClient()->browser()->OpenItem(path); |
| 986 } | 986 } |
| 987 | 987 |
| 988 void BrowserRenderProcessHost::OnSavedPageAsMHTML(int job_id, int64 data_size) { | 988 void BrowserRenderProcessHost::OnSavedPageAsMHTML(int job_id, int64 data_size) { |
| 989 content::GetContentClient()->browser()->GetMHTMLGenerationManager()-> | 989 content::GetContentClient()->browser()->GetMHTMLGenerationManager()-> |
| 990 MHTMLGenerated(job_id, data_size); | 990 MHTMLGenerated(job_id, data_size); |
| 991 } | 991 } |
| OLD | NEW |