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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 | 111 |
112 #if defined(OS_WIN) | 112 #if defined(OS_WIN) |
113 #include "base/synchronization/waitable_event.h" | 113 #include "base/synchronization/waitable_event.h" |
114 #include "content/common/font_cache_dispatcher_win.h" | 114 #include "content/common/font_cache_dispatcher_win.h" |
115 #endif | 115 #endif |
116 | 116 |
117 #if defined(ENABLE_INPUT_SPEECH) | 117 #if defined(ENABLE_INPUT_SPEECH) |
118 #include "content/browser/speech/input_tag_speech_dispatcher_host.h" | 118 #include "content/browser/speech/input_tag_speech_dispatcher_host.h" |
119 #endif | 119 #endif |
120 | 120 |
| 121 #if defined(OS_CHROMEOS) |
| 122 #include "content/browser/battery_status/battery_status_message_filter.h" |
| 123 #endif |
| 124 |
121 #include "third_party/skia/include/core/SkBitmap.h" | 125 #include "third_party/skia/include/core/SkBitmap.h" |
122 | 126 |
123 using content::BrowserContext; | 127 using content::BrowserContext; |
124 using content::BrowserMessageFilter; | 128 using content::BrowserMessageFilter; |
125 using content::BrowserThread; | 129 using content::BrowserThread; |
126 using content::ChildProcessHost; | 130 using content::ChildProcessHost; |
127 using content::ChildProcessHostImpl; | 131 using content::ChildProcessHostImpl; |
128 using content::RenderWidgetHost; | 132 using content::RenderWidgetHost; |
129 using content::RenderWidgetHostImpl; | 133 using content::RenderWidgetHostImpl; |
130 using content::UserMetricsAction; | 134 using content::UserMetricsAction; |
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
515 channel_->AddFilter(new FileUtilitiesMessageFilter(GetID())); | 519 channel_->AddFilter(new FileUtilitiesMessageFilter(GetID())); |
516 channel_->AddFilter(new MimeRegistryMessageFilter()); | 520 channel_->AddFilter(new MimeRegistryMessageFilter()); |
517 channel_->AddFilter(new DatabaseMessageFilter( | 521 channel_->AddFilter(new DatabaseMessageFilter( |
518 BrowserContext::GetDatabaseTracker(browser_context))); | 522 BrowserContext::GetDatabaseTracker(browser_context))); |
519 #if defined(OS_MACOSX) | 523 #if defined(OS_MACOSX) |
520 channel_->AddFilter(new TextInputClientMessageFilter(GetID())); | 524 channel_->AddFilter(new TextInputClientMessageFilter(GetID())); |
521 #elif defined(OS_WIN) | 525 #elif defined(OS_WIN) |
522 channel_->AddFilter(new FontCacheDispatcher()); | 526 channel_->AddFilter(new FontCacheDispatcher()); |
523 #endif | 527 #endif |
524 | 528 |
| 529 #if defined(OS_CHROMEOS) |
| 530 channel_->AddFilter(new BatteryStatusMessageFilter()); |
| 531 #endif |
| 532 |
525 SocketStreamDispatcherHost* socket_stream_dispatcher_host = | 533 SocketStreamDispatcherHost* socket_stream_dispatcher_host = |
526 new SocketStreamDispatcherHost(GetID(), | 534 new SocketStreamDispatcherHost(GetID(), |
527 new RendererURLRequestContextSelector(browser_context, GetID()), | 535 new RendererURLRequestContextSelector(browser_context, GetID()), |
528 resource_context); | 536 resource_context); |
529 channel_->AddFilter(socket_stream_dispatcher_host); | 537 channel_->AddFilter(socket_stream_dispatcher_host); |
530 | 538 |
531 channel_->AddFilter(new WorkerMessageFilter(GetID(), resource_context, | 539 channel_->AddFilter(new WorkerMessageFilter(GetID(), resource_context, |
532 base::Bind(&RenderWidgetHelper::GetNextRoutingID, | 540 base::Bind(&RenderWidgetHelper::GetNextRoutingID, |
533 base::Unretained(widget_helper_.get())))); | 541 base::Unretained(widget_helper_.get())))); |
534 | 542 |
(...skipping 808 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1343 void RenderProcessHostImpl::OnRevealFolderInOS(const FilePath& path) { | 1351 void RenderProcessHostImpl::OnRevealFolderInOS(const FilePath& path) { |
1344 // Only honor the request if appropriate persmissions are granted. | 1352 // Only honor the request if appropriate persmissions are granted. |
1345 if (ChildProcessSecurityPolicyImpl::GetInstance()->CanReadFile(GetID(), | 1353 if (ChildProcessSecurityPolicyImpl::GetInstance()->CanReadFile(GetID(), |
1346 path)) | 1354 path)) |
1347 content::GetContentClient()->browser()->OpenItem(path); | 1355 content::GetContentClient()->browser()->OpenItem(path); |
1348 } | 1356 } |
1349 | 1357 |
1350 void RenderProcessHostImpl::OnSavedPageAsMHTML(int job_id, int64 data_size) { | 1358 void RenderProcessHostImpl::OnSavedPageAsMHTML(int job_id, int64 data_size) { |
1351 MHTMLGenerationManager::GetInstance()->MHTMLGenerated(job_id, data_size); | 1359 MHTMLGenerationManager::GetInstance()->MHTMLGenerated(job_id, data_size); |
1352 } | 1360 } |
OLD | NEW |