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

Side by Side Diff: content/browser/gpu/gpu_process_host.h

Issue 17074009: Created multi-process-friendly PowerMonitor interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressing Feedback 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 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 #ifndef CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_H_ 5 #ifndef CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_H_
6 #define CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_H_ 6 #define CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_H_
7 7
8 #include <map> 8 #include <map>
9 #include <queue> 9 #include <queue>
10 #include <set> 10 #include <set>
11 #include <string> 11 #include <string>
12 12
13 #include "base/callback.h" 13 #include "base/callback.h"
14 #include "base/containers/hash_tables.h" 14 #include "base/containers/hash_tables.h"
15 #include "base/memory/weak_ptr.h" 15 #include "base/memory/weak_ptr.h"
16 #include "base/threading/non_thread_safe.h" 16 #include "base/threading/non_thread_safe.h"
17 #include "base/time.h" 17 #include "base/time.h"
18 #include "content/browser/gpu/gpu_surface_tracker.h" 18 #include "content/browser/gpu/gpu_surface_tracker.h"
19 #include "content/common/content_export.h" 19 #include "content/common/content_export.h"
20 #include "content/common/gpu/gpu_memory_uma_stats.h" 20 #include "content/common/gpu/gpu_memory_uma_stats.h"
21 #include "content/common/gpu/gpu_process_launch_causes.h" 21 #include "content/common/gpu/gpu_process_launch_causes.h"
22 #include "content/common/power_monitor_message_broadcaster.h"
22 #include "content/public/browser/browser_child_process_host_delegate.h" 23 #include "content/public/browser/browser_child_process_host_delegate.h"
23 #include "content/public/browser/gpu_data_manager.h" 24 #include "content/public/browser/gpu_data_manager.h"
24 #include "googleurl/src/gurl.h" 25 #include "googleurl/src/gurl.h"
25 #include "gpu/command_buffer/common/constants.h" 26 #include "gpu/command_buffer/common/constants.h"
26 #include "gpu/config/gpu_info.h" 27 #include "gpu/config/gpu_info.h"
27 #include "ipc/ipc_channel_proxy.h" 28 #include "ipc/ipc_channel_proxy.h"
28 #include "ipc/ipc_sender.h" 29 #include "ipc/ipc_sender.h"
29 #include "ui/gfx/native_widget_types.h" 30 #include "ui/gfx/native_widget_types.h"
30 #include "ui/gfx/size.h" 31 #include "ui/gfx/size.h"
31 32
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 259
259 std::string shader_prefix_key_; 260 std::string shader_prefix_key_;
260 261
261 // Keep an extra reference to the SurfaceRef stored in the GpuSurfaceTracker 262 // Keep an extra reference to the SurfaceRef stored in the GpuSurfaceTracker
262 // in this map so that we don't destroy it whilst the GPU process is 263 // in this map so that we don't destroy it whilst the GPU process is
263 // drawing to it. 264 // drawing to it.
264 typedef std::multimap<int, scoped_refptr<GpuSurfaceTracker::SurfaceRef> > 265 typedef std::multimap<int, scoped_refptr<GpuSurfaceTracker::SurfaceRef> >
265 SurfaceRefMap; 266 SurfaceRefMap;
266 SurfaceRefMap surface_refs_; 267 SurfaceRefMap surface_refs_;
267 268
269 PowerMonitorMessageBroadcaster power_monitor_broadcaster_;
270
268 DISALLOW_COPY_AND_ASSIGN(GpuProcessHost); 271 DISALLOW_COPY_AND_ASSIGN(GpuProcessHost);
269 }; 272 };
270 273
271 } // namespace content 274 } // namespace content
272 275
273 #endif // CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_H_ 276 #endif // CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698