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

Side by Side Diff: content/public/browser/gpu_data_manager_observer.h

Issue 1726343003: Revert of Mustash: move content::GPUVideoMemoryUsageStats to gpu::VideoMemoryUsageStats (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
« no previous file with comments | « content/gpu/gpu_child_thread.cc ('k') | content/public/common/gpu_memory_stats.h » ('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 #ifndef CONTENT_PUBLIC_BROWSER_GPU_DATA_MANAGER_OBSERVER_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_GPU_DATA_MANAGER_OBSERVER_H_
6 #define CONTENT_PUBLIC_BROWSER_GPU_DATA_MANAGER_OBSERVER_H_ 6 #define CONTENT_PUBLIC_BROWSER_GPU_DATA_MANAGER_OBSERVER_H_
7 7
8 #include "base/process/kill.h" 8 #include "base/process/kill.h"
9 #include "content/common/content_export.h" 9 #include "content/common/content_export.h"
10 #include "content/public/common/gpu_memory_stats.h"
10 #include "content/public/common/three_d_api_types.h" 11 #include "content/public/common/three_d_api_types.h"
11 12
12 class GURL; 13 class GURL;
13 14
14 namespace gpu {
15 struct VideoMemoryUsageStats;
16 }
17
18 namespace content { 15 namespace content {
19 16
20 // Observers can register themselves via GpuDataManager::AddObserver, and 17 // Observers can register themselves via GpuDataManager::AddObserver, and
21 // can un-register with GpuDataManager::RemoveObserver. 18 // can un-register with GpuDataManager::RemoveObserver.
22 class CONTENT_EXPORT GpuDataManagerObserver { 19 class CONTENT_EXPORT GpuDataManagerObserver {
23 public: 20 public:
24 // Called for any observers whenever there is a GPU info update. 21 // Called for any observers whenever there is a GPU info update.
25 virtual void OnGpuInfoUpdate() {} 22 virtual void OnGpuInfoUpdate() {}
26 23
27 // Called for any observers whenever there is a GPU video memory update. 24 // Called for any observers whenever there is a GPU video memory update.
28 virtual void OnVideoMemoryUsageStatsUpdate( 25 virtual void OnVideoMemoryUsageStatsUpdate(
29 const gpu::VideoMemoryUsageStats& video_memory_usage_stats) {} 26 const GPUVideoMemoryUsageStats& video_memory_usage_stats) {}
30 27
31 // Indicates that client 3D APIs (Pepper 3D, WebGL) were just blocked on the 28 // Indicates that client 3D APIs (Pepper 3D, WebGL) were just blocked on the
32 // given page, specifically because the GPU was reset recently. 29 // given page, specifically because the GPU was reset recently.
33 virtual void DidBlock3DAPIs(const GURL& top_origin_url, 30 virtual void DidBlock3DAPIs(const GURL& top_origin_url,
34 int render_process_id, 31 int render_process_id,
35 int render_frame_id, 32 int render_frame_id,
36 ThreeDAPIType requester) {} 33 ThreeDAPIType requester) {}
37 34
38 // Called for any observer when the GPU process crashed. 35 // Called for any observer when the GPU process crashed.
39 virtual void OnGpuProcessCrashed(base::TerminationStatus exit_code) {} 36 virtual void OnGpuProcessCrashed(base::TerminationStatus exit_code) {}
40 37
41 protected: 38 protected:
42 virtual ~GpuDataManagerObserver() {} 39 virtual ~GpuDataManagerObserver() {}
43 }; 40 };
44 41
45 }; // namespace content 42 }; // namespace content
46 43
47 #endif // CONTENT_PUBLIC_BROWSER_GPU_DATA_MANAGER_OBSERVER_H_ 44 #endif // CONTENT_PUBLIC_BROWSER_GPU_DATA_MANAGER_OBSERVER_H_
OLDNEW
« no previous file with comments | « content/gpu/gpu_child_thread.cc ('k') | content/public/common/gpu_memory_stats.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698