| 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/render_process_host_impl.h" | 8 #include "content/browser/renderer_host/render_process_host_impl.h" |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 #include "ui/base/ui_base_switches.h" | 97 #include "ui/base/ui_base_switches.h" |
| 98 #include "ui/gfx/gl/gl_switches.h" | 98 #include "ui/gfx/gl/gl_switches.h" |
| 99 #include "webkit/fileapi/file_system_path_manager.h" | 99 #include "webkit/fileapi/file_system_path_manager.h" |
| 100 #include "webkit/fileapi/sandbox_mount_point_provider.h" | 100 #include "webkit/fileapi/sandbox_mount_point_provider.h" |
| 101 #include "webkit/glue/resource_type.h" | 101 #include "webkit/glue/resource_type.h" |
| 102 #include "webkit/plugins/plugin_switches.h" | 102 #include "webkit/plugins/plugin_switches.h" |
| 103 | 103 |
| 104 #if defined(OS_WIN) | 104 #if defined(OS_WIN) |
| 105 #include <objbase.h> | 105 #include <objbase.h> |
| 106 #include "base/synchronization/waitable_event.h" | 106 #include "base/synchronization/waitable_event.h" |
| 107 #include "content/common/font_cache_dispatcher_win.h" |
| 107 #endif | 108 #endif |
| 108 | 109 |
| 109 #include "third_party/skia/include/core/SkBitmap.h" | 110 #include "third_party/skia/include/core/SkBitmap.h" |
| 110 | 111 |
| 111 using content::BrowserThread; | 112 using content::BrowserThread; |
| 112 | 113 |
| 113 // This class creates the IO thread for the renderer when running in | 114 // This class creates the IO thread for the renderer when running in |
| 114 // single-process mode. It's not used in multi-process mode. | 115 // single-process mode. It's not used in multi-process mode. |
| 115 class RendererMainThread : public base::Thread { | 116 class RendererMainThread : public base::Thread { |
| 116 public: | 117 public: |
| (...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 499 channel_->AddFilter(new device_orientation::MessageFilter()); | 500 channel_->AddFilter(new device_orientation::MessageFilter()); |
| 500 channel_->AddFilter( | 501 channel_->AddFilter( |
| 501 new BlobMessageFilter(GetID(), | 502 new BlobMessageFilter(GetID(), |
| 502 GetBrowserContext()->GetBlobStorageContext())); | 503 GetBrowserContext()->GetBlobStorageContext())); |
| 503 channel_->AddFilter(new FileUtilitiesMessageFilter(GetID())); | 504 channel_->AddFilter(new FileUtilitiesMessageFilter(GetID())); |
| 504 channel_->AddFilter(new MimeRegistryMessageFilter()); | 505 channel_->AddFilter(new MimeRegistryMessageFilter()); |
| 505 channel_->AddFilter(new DatabaseMessageFilter( | 506 channel_->AddFilter(new DatabaseMessageFilter( |
| 506 GetBrowserContext()->GetDatabaseTracker())); | 507 GetBrowserContext()->GetDatabaseTracker())); |
| 507 #if defined(OS_MACOSX) | 508 #if defined(OS_MACOSX) |
| 508 channel_->AddFilter(new TextInputClientMessageFilter(GetID())); | 509 channel_->AddFilter(new TextInputClientMessageFilter(GetID())); |
| 510 #elif defined(OS_WIN) |
| 511 channel_->AddFilter(new FontCacheDispatcher()); |
| 509 #endif | 512 #endif |
| 510 | 513 |
| 511 SocketStreamDispatcherHost* socket_stream_dispatcher_host = | 514 SocketStreamDispatcherHost* socket_stream_dispatcher_host = |
| 512 new SocketStreamDispatcherHost( | 515 new SocketStreamDispatcherHost( |
| 513 new RendererURLRequestContextSelector(GetBrowserContext(), GetID()), | 516 new RendererURLRequestContextSelector(GetBrowserContext(), GetID()), |
| 514 &GetBrowserContext()->GetResourceContext()); | 517 &GetBrowserContext()->GetResourceContext()); |
| 515 channel_->AddFilter(socket_stream_dispatcher_host); | 518 channel_->AddFilter(socket_stream_dispatcher_host); |
| 516 | 519 |
| 517 channel_->AddFilter( | 520 channel_->AddFilter( |
| 518 new WorkerMessageFilter( | 521 new WorkerMessageFilter( |
| (...skipping 792 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1311 void RenderProcessHostImpl::OnRevealFolderInOS(const FilePath& path) { | 1314 void RenderProcessHostImpl::OnRevealFolderInOS(const FilePath& path) { |
| 1312 // Only honor the request if appropriate persmissions are granted. | 1315 // Only honor the request if appropriate persmissions are granted. |
| 1313 if (ChildProcessSecurityPolicy::GetInstance()->CanReadFile(GetID(), path)) | 1316 if (ChildProcessSecurityPolicy::GetInstance()->CanReadFile(GetID(), path)) |
| 1314 content::GetContentClient()->browser()->OpenItem(path); | 1317 content::GetContentClient()->browser()->OpenItem(path); |
| 1315 } | 1318 } |
| 1316 | 1319 |
| 1317 void RenderProcessHostImpl::OnSavedPageAsMHTML(int job_id, int64 data_size) { | 1320 void RenderProcessHostImpl::OnSavedPageAsMHTML(int job_id, int64 data_size) { |
| 1318 content::GetContentClient()->browser()->GetMHTMLGenerationManager()-> | 1321 content::GetContentClient()->browser()->GetMHTMLGenerationManager()-> |
| 1319 MHTMLGenerated(job_id, data_size); | 1322 MHTMLGenerated(job_id, data_size); |
| 1320 } | 1323 } |
| OLD | NEW |