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

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 piman feedback [Part 2] 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..2300b18b5e06e74d1602b5d3326f65d9d60e0d06 100644
--- a/content/browser/gpu/gpu_process_host_ui_shim.cc
+++ b/content/browser/gpu/gpu_process_host_ui_shim.cc
@@ -103,15 +103,18 @@ 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));
}
// 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