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

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

Issue 641703002: Rewrite the Android implementation of BatteryMonitor directly in Java. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@battery-status-api-to-mojo
Patch Set: Address Torne's comment. Created 6 years 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
« no previous file with comments | « content/browser/mojo/service_registry_android.h ('k') | content/content_browser.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 #include "ui/base/ui_base_switches.h" 150 #include "ui/base/ui_base_switches.h"
151 #include "ui/events/event_switches.h" 151 #include "ui/events/event_switches.h"
152 #include "ui/gfx/switches.h" 152 #include "ui/gfx/switches.h"
153 #include "ui/gl/gl_switches.h" 153 #include "ui/gl/gl_switches.h"
154 #include "ui/gl/gpu_switching_manager.h" 154 #include "ui/gl/gpu_switching_manager.h"
155 #include "ui/native_theme/native_theme_switches.h" 155 #include "ui/native_theme/native_theme_switches.h"
156 156
157 #if defined(OS_ANDROID) 157 #if defined(OS_ANDROID)
158 #include "content/browser/android/child_process_launcher_android.h" 158 #include "content/browser/android/child_process_launcher_android.h"
159 #include "content/browser/media/android/browser_demuxer_android.h" 159 #include "content/browser/media/android/browser_demuxer_android.h"
160 #include "content/browser/mojo/service_registrar_android.h"
160 #include "content/browser/screen_orientation/screen_orientation_message_filter_a ndroid.h" 161 #include "content/browser/screen_orientation/screen_orientation_message_filter_a ndroid.h"
161 #endif 162 #endif
162 163
163 #if defined(OS_WIN) 164 #if defined(OS_WIN)
164 #include "base/win/scoped_com_initializer.h" 165 #include "base/win/scoped_com_initializer.h"
165 #include "content/common/font_cache_dispatcher_win.h" 166 #include "content/common/font_cache_dispatcher_win.h"
166 #include "content/common/sandbox_win.h" 167 #include "content/common/sandbox_win.h"
167 #include "ui/gfx/win/dpi.h" 168 #include "ui/gfx/win/dpi.h"
168 #endif 169 #endif
169 170
(...skipping 726 matching lines...) Expand 10 before | Expand all | Expand 10 after
896 mojo_application_host_->service_registry()->AddService( 897 mojo_application_host_->service_registry()->AddService(
897 base::Bind(&device::BatteryMonitorImpl::Create)); 898 base::Bind(&device::BatteryMonitorImpl::Create));
898 899
899 mojo_application_host_->service_registry()->AddService( 900 mojo_application_host_->service_registry()->AddService(
900 base::Bind(&device::VibrationManagerImpl::Create)); 901 base::Bind(&device::VibrationManagerImpl::Create));
901 902
902 mojo_application_host_->service_registry()->AddService( 903 mojo_application_host_->service_registry()->AddService(
903 base::Bind(&PermissionServiceContext::CreateService, 904 base::Bind(&PermissionServiceContext::CreateService,
904 base::Unretained(permission_service_context_.get()))); 905 base::Unretained(permission_service_context_.get())));
905 906
907 #if defined(OS_ANDROID)
908 ServiceRegistrarAndroid::RegisterProcessHostServices(
909 mojo_application_host_->service_registry_android());
910 #endif
911
906 GetContentClient()->browser()->OverrideRenderProcessMojoServices( 912 GetContentClient()->browser()->OverrideRenderProcessMojoServices(
907 mojo_application_host_->service_registry()); 913 mojo_application_host_->service_registry());
908 } 914 }
909 915
910 int RenderProcessHostImpl::GetNextRoutingID() { 916 int RenderProcessHostImpl::GetNextRoutingID() {
911 return widget_helper_->GetNextRoutingID(); 917 return widget_helper_->GetNextRoutingID();
912 } 918 }
913 919
914 void RenderProcessHostImpl::ResumeDeferredNavigation( 920 void RenderProcessHostImpl::ResumeDeferredNavigation(
915 const GlobalRequestID& request_id) { 921 const GlobalRequestID& request_id) {
(...skipping 1434 matching lines...) Expand 10 before | Expand all | Expand 10 after
2350 2356
2351 void RenderProcessHostImpl::DecrementWorkerRefCount() { 2357 void RenderProcessHostImpl::DecrementWorkerRefCount() {
2352 DCHECK_CURRENTLY_ON(BrowserThread::UI); 2358 DCHECK_CURRENTLY_ON(BrowserThread::UI);
2353 DCHECK_GT(worker_ref_count_, 0); 2359 DCHECK_GT(worker_ref_count_, 0);
2354 --worker_ref_count_; 2360 --worker_ref_count_;
2355 if (worker_ref_count_ == 0) 2361 if (worker_ref_count_ == 0)
2356 Cleanup(); 2362 Cleanup();
2357 } 2363 }
2358 2364
2359 } // namespace content 2365 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/mojo/service_registry_android.h ('k') | content/content_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698