Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(267)

Side by Side Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 10024013: chromeos: Add support for the battery status API on chromeos. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: file-move Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 22 matching lines...) Expand all
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 "content/browser/appcache/appcache_dispatcher_host.h" 41 #include "content/browser/appcache/appcache_dispatcher_host.h"
42 #include "content/browser/appcache/chrome_appcache_service.h" 42 #include "content/browser/appcache/chrome_appcache_service.h"
43 #include "content/browser/battery_status/battery_status_message_filter.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"
51 #include "content/browser/gpu/gpu_data_manager_impl.h" 52 #include "content/browser/gpu/gpu_data_manager_impl.h"
52 #include "content/browser/gpu/gpu_process_host.h" 53 #include "content/browser/gpu/gpu_process_host.h"
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after
514 channel_->AddFilter(new device_orientation::MessageFilter()); 515 channel_->AddFilter(new device_orientation::MessageFilter());
515 channel_->AddFilter(new FileUtilitiesMessageFilter(GetID())); 516 channel_->AddFilter(new FileUtilitiesMessageFilter(GetID()));
516 channel_->AddFilter(new MimeRegistryMessageFilter()); 517 channel_->AddFilter(new MimeRegistryMessageFilter());
517 channel_->AddFilter(new DatabaseMessageFilter( 518 channel_->AddFilter(new DatabaseMessageFilter(
518 BrowserContext::GetDatabaseTracker(browser_context))); 519 BrowserContext::GetDatabaseTracker(browser_context)));
519 #if defined(OS_MACOSX) 520 #if defined(OS_MACOSX)
520 channel_->AddFilter(new TextInputClientMessageFilter(GetID())); 521 channel_->AddFilter(new TextInputClientMessageFilter(GetID()));
521 #elif defined(OS_WIN) 522 #elif defined(OS_WIN)
522 channel_->AddFilter(new FontCacheDispatcher()); 523 channel_->AddFilter(new FontCacheDispatcher());
523 #endif 524 #endif
525 channel_->AddFilter(new BatteryStatusMessageFilter());
524 526
525 SocketStreamDispatcherHost* socket_stream_dispatcher_host = 527 SocketStreamDispatcherHost* socket_stream_dispatcher_host =
526 new SocketStreamDispatcherHost(GetID(), 528 new SocketStreamDispatcherHost(GetID(),
527 new RendererURLRequestContextSelector(browser_context, GetID()), 529 new RendererURLRequestContextSelector(browser_context, GetID()),
528 resource_context); 530 resource_context);
529 channel_->AddFilter(socket_stream_dispatcher_host); 531 channel_->AddFilter(socket_stream_dispatcher_host);
530 532
531 channel_->AddFilter(new WorkerMessageFilter(GetID(), resource_context, 533 channel_->AddFilter(new WorkerMessageFilter(GetID(), resource_context,
532 base::Bind(&RenderWidgetHelper::GetNextRoutingID, 534 base::Bind(&RenderWidgetHelper::GetNextRoutingID,
533 base::Unretained(widget_helper_.get())))); 535 base::Unretained(widget_helper_.get()))));
(...skipping 812 matching lines...) Expand 10 before | Expand all | Expand 10 after
1346 void RenderProcessHostImpl::OnRevealFolderInOS(const FilePath& path) { 1348 void RenderProcessHostImpl::OnRevealFolderInOS(const FilePath& path) {
1347 // Only honor the request if appropriate persmissions are granted. 1349 // Only honor the request if appropriate persmissions are granted.
1348 if (ChildProcessSecurityPolicyImpl::GetInstance()->CanReadFile(GetID(), 1350 if (ChildProcessSecurityPolicyImpl::GetInstance()->CanReadFile(GetID(),
1349 path)) 1351 path))
1350 content::GetContentClient()->browser()->OpenItem(path); 1352 content::GetContentClient()->browser()->OpenItem(path);
1351 } 1353 }
1352 1354
1353 void RenderProcessHostImpl::OnSavedPageAsMHTML(int job_id, int64 data_size) { 1355 void RenderProcessHostImpl::OnSavedPageAsMHTML(int job_id, int64 data_size) {
1354 MHTMLGenerationManager::GetInstance()->MHTMLGenerated(job_id, data_size); 1356 MHTMLGenerationManager::GetInstance()->MHTMLGenerated(job_id, data_size);
1355 } 1357 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698