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

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

Issue 278043002: Battery Status API: browser-side implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 7 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
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 #include <algorithm> 10 #include <algorithm>
(...skipping 20 matching lines...) Expand all
31 #include "base/stl_util.h" 31 #include "base/stl_util.h"
32 #include "base/strings/string_util.h" 32 #include "base/strings/string_util.h"
33 #include "base/supports_user_data.h" 33 #include "base/supports_user_data.h"
34 #include "base/sys_info.h" 34 #include "base/sys_info.h"
35 #include "base/threading/thread.h" 35 #include "base/threading/thread.h"
36 #include "base/threading/thread_restrictions.h" 36 #include "base/threading/thread_restrictions.h"
37 #include "base/tracked_objects.h" 37 #include "base/tracked_objects.h"
38 #include "cc/base/switches.h" 38 #include "cc/base/switches.h"
39 #include "content/browser/appcache/appcache_dispatcher_host.h" 39 #include "content/browser/appcache/appcache_dispatcher_host.h"
40 #include "content/browser/appcache/chrome_appcache_service.h" 40 #include "content/browser/appcache/chrome_appcache_service.h"
41 #include "content/browser/battery_status/battery_status_message_filter.h"
41 #include "content/browser/browser_child_process_host_impl.h" 42 #include "content/browser/browser_child_process_host_impl.h"
42 #include "content/browser/browser_main.h" 43 #include "content/browser/browser_main.h"
43 #include "content/browser/browser_main_loop.h" 44 #include "content/browser/browser_main_loop.h"
44 #include "content/browser/browser_plugin/browser_plugin_message_filter.h" 45 #include "content/browser/browser_plugin/browser_plugin_message_filter.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_sensors/device_motion_message_filter.h" 47 #include "content/browser/device_sensors/device_motion_message_filter.h"
47 #include "content/browser/device_sensors/device_orientation_message_filter.h" 48 #include "content/browser/device_sensors/device_orientation_message_filter.h"
48 #include "content/browser/dom_storage/dom_storage_context_wrapper.h" 49 #include "content/browser/dom_storage/dom_storage_context_wrapper.h"
49 #include "content/browser/dom_storage/dom_storage_message_filter.h" 50 #include "content/browser/dom_storage/dom_storage_message_filter.h"
50 #include "content/browser/download/mhtml_generation_manager.h" 51 #include "content/browser/download/mhtml_generation_manager.h"
(...skipping 776 matching lines...) Expand 10 before | Expand all | Expand 10 after
827 AddFilter(new HistogramMessageFilter()); 828 AddFilter(new HistogramMessageFilter());
828 #if defined(USE_TCMALLOC) && (defined(OS_LINUX) || defined(OS_ANDROID)) 829 #if defined(USE_TCMALLOC) && (defined(OS_LINUX) || defined(OS_ANDROID))
829 if (CommandLine::ForCurrentProcess()->HasSwitch( 830 if (CommandLine::ForCurrentProcess()->HasSwitch(
830 switches::kEnableMemoryBenchmarking)) 831 switches::kEnableMemoryBenchmarking))
831 AddFilter(new MemoryBenchmarkMessageFilter()); 832 AddFilter(new MemoryBenchmarkMessageFilter());
832 #endif 833 #endif
833 AddFilter(new VibrationMessageFilter()); 834 AddFilter(new VibrationMessageFilter());
834 screen_orientation_dispatcher_host_ = new ScreenOrientationDispatcherHost(); 835 screen_orientation_dispatcher_host_ = new ScreenOrientationDispatcherHost();
835 AddFilter(screen_orientation_dispatcher_host_); 836 AddFilter(screen_orientation_dispatcher_host_);
836 AddFilter(new PushMessagingMessageFilter()); 837 AddFilter(new PushMessagingMessageFilter());
838 AddFilter(new BatteryStatusMessageFilter());
837 } 839 }
838 840
839 int RenderProcessHostImpl::GetNextRoutingID() { 841 int RenderProcessHostImpl::GetNextRoutingID() {
840 return widget_helper_->GetNextRoutingID(); 842 return widget_helper_->GetNextRoutingID();
841 } 843 }
842 844
843 845
844 void RenderProcessHostImpl::ResumeDeferredNavigation( 846 void RenderProcessHostImpl::ResumeDeferredNavigation(
845 const GlobalRequestID& request_id) { 847 const GlobalRequestID& request_id) {
846 widget_helper_->ResumeDeferredNavigation(request_id); 848 widget_helper_->ResumeDeferredNavigation(request_id);
(...skipping 1229 matching lines...) Expand 10 before | Expand all | Expand 10 after
2076 mojo::ScopedMessagePipeHandle handle) { 2078 mojo::ScopedMessagePipeHandle handle) {
2077 mojo_activation_required_ = true; 2079 mojo_activation_required_ = true;
2078 MaybeActivateMojo(); 2080 MaybeActivateMojo();
2079 2081
2080 mojo::AllocationScope scope; 2082 mojo::AllocationScope scope;
2081 mojo_application_host_->shell_client()->AcceptConnection(service_name, 2083 mojo_application_host_->shell_client()->AcceptConnection(service_name,
2082 handle.Pass()); 2084 handle.Pass());
2083 } 2085 }
2084 2086
2085 } // namespace content 2087 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698