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

Unified Diff: content/browser/gpu/gpu_process_host_ui_shim.cc

Issue 17074009: Created multi-process-friendly PowerMonitor interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressing final nits Created 7 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/gpu/gpu_process_host_ui_shim.cc
diff --git a/content/browser/gpu/gpu_process_host_ui_shim.cc b/content/browser/gpu/gpu_process_host_ui_shim.cc
index 2d0c4255db9441528954ce2e9da10c82e4edfeb8..e323d881c6e20c98ee9ff14989ea789df7b8d2cf 100644
--- a/content/browser/gpu/gpu_process_host_ui_shim.cc
+++ b/content/browser/gpu/gpu_process_host_ui_shim.cc
@@ -103,15 +103,19 @@ void RouteToGpuProcessHostUIShimTask(int host_id, const IPC::Message& msg) {
ui_shim->OnMessageReceived(msg);
}
-GpuProcessHostUIShim::GpuProcessHostUIShim(int host_id)
+GpuProcessHostUIShim::GpuProcessHostUIShim(int host_id, bool single_process)
: host_id_(host_id) {
g_hosts_by_id.Pointer()->AddWithID(this, host_id_);
+ if (!single_process)
+ power_monitor_broadcaster_.reset(new PowerMonitorMessageBroadcaster(this));
jam 2013/07/17 00:29:42 since this is a generic class, it should be attach
bajones 2013/07/19 22:44:56 I generally agree with this sentiment, but as apat
jam 2013/07/20 00:28:55 There are two kinds of child process hosts: the re
}
// static
-GpuProcessHostUIShim* GpuProcessHostUIShim::Create(int host_id) {
+GpuProcessHostUIShim* GpuProcessHostUIShim::Create(
+ int host_id,
+ bool single_process) {
DCHECK(!FromID(host_id));
- return new GpuProcessHostUIShim(host_id);
+ return new GpuProcessHostUIShim(host_id, single_process);
}
// static

Powered by Google App Engine
This is Rietveld 408576698