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

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

Issue 15745014: Move GPU device/driver info related code from content to gpu. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: rebase Created 7 years, 7 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
« no previous file with comments | « content/gpu/gpu_main.cc ('k') | content/public/common/content_client.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_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_GPU_DATA_MANAGER_H_
6 #define CONTENT_PUBLIC_BROWSER_GPU_DATA_MANAGER_H_ 6 #define CONTENT_PUBLIC_BROWSER_GPU_DATA_MANAGER_H_
7 7
8 #include <list> 8 #include <list>
9 #include <string> 9 #include <string>
10 10
11 #include "base/callback_forward.h" 11 #include "base/callback_forward.h"
12 #include "base/process.h" 12 #include "base/process.h"
13 #include "content/common/content_export.h" 13 #include "content/common/content_export.h"
14 14
15 class GURL; 15 class GURL;
16 16
17 namespace base { 17 namespace base {
18 class FilePath; 18 class FilePath;
19 class ListValue; 19 class ListValue;
20 } 20 }
21 21
22 namespace gpu {
23 struct GPUInfo;
24 }
25
22 namespace content { 26 namespace content {
23 27
24 class GpuDataManagerObserver; 28 class GpuDataManagerObserver;
25 struct GPUInfo;
26 29
27 // This class is fully thread-safe. 30 // This class is fully thread-safe.
28 class GpuDataManager { 31 class GpuDataManager {
29 public: 32 public:
30 typedef base::Callback<void(const std::list<base::ProcessHandle>&)> 33 typedef base::Callback<void(const std::list<base::ProcessHandle>&)>
31 GetGpuProcessHandlesCallback; 34 GetGpuProcessHandlesCallback;
32 35
33 // Getter for the singleton. 36 // Getter for the singleton.
34 CONTENT_EXPORT static GpuDataManager* GetInstance(); 37 CONTENT_EXPORT static GpuDataManager* GetInstance();
35 38
36 virtual void InitializeForTesting(const std::string& gpu_blacklist_json, 39 virtual void InitializeForTesting(const std::string& gpu_blacklist_json,
37 const content::GPUInfo& gpu_info) = 0; 40 const gpu::GPUInfo& gpu_info) = 0;
38 41
39 virtual bool IsFeatureBlacklisted(int feature) const = 0; 42 virtual bool IsFeatureBlacklisted(int feature) const = 0;
40 43
41 virtual GPUInfo GetGPUInfo() const = 0; 44 virtual gpu::GPUInfo GetGPUInfo() const = 0;
42 45
43 // Retrieves a list of process handles for all gpu processes. 46 // Retrieves a list of process handles for all gpu processes.
44 virtual void GetGpuProcessHandles( 47 virtual void GetGpuProcessHandles(
45 const GetGpuProcessHandlesCallback& callback) const = 0; 48 const GetGpuProcessHandlesCallback& callback) const = 0;
46 49
47 // This indicator might change because we could collect more GPU info or 50 // This indicator might change because we could collect more GPU info or
48 // because the GPU blacklist could be updated. 51 // because the GPU blacklist could be updated.
49 // If this returns false, any further GPU access, including launching GPU 52 // If this returns false, any further GPU access, including launching GPU
50 // process, establish GPU channel, and GPU info collection, should be 53 // process, establish GPU channel, and GPU info collection, should be
51 // blocked. 54 // blocked.
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 // Turn off all hardware acceleration. 97 // Turn off all hardware acceleration.
95 virtual void DisableHardwareAcceleration() = 0; 98 virtual void DisableHardwareAcceleration() = 0;
96 99
97 protected: 100 protected:
98 virtual ~GpuDataManager() {} 101 virtual ~GpuDataManager() {}
99 }; 102 };
100 103
101 }; // namespace content 104 }; // namespace content
102 105
103 #endif // CONTENT_PUBLIC_BROWSER_GPU_DATA_MANAGER_H_ 106 #endif // CONTENT_PUBLIC_BROWSER_GPU_DATA_MANAGER_H_
OLDNEW
« no previous file with comments | « content/gpu/gpu_main.cc ('k') | content/public/common/content_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698