OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_DATA_MANAGER_H_ | 5 #ifndef CONTENT_BROWSER_GPU_GPU_DATA_MANAGER_H_ |
6 #define CONTENT_BROWSER_GPU_GPU_DATA_MANAGER_H_ | 6 #define CONTENT_BROWSER_GPU_GPU_DATA_MANAGER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
11 | 11 |
12 #include "base/callback_old.h" | 12 #include "base/callback_old.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "base/memory/singleton.h" | 14 #include "base/memory/singleton.h" |
15 #include "base/synchronization/lock.h" | 15 #include "base/synchronization/lock.h" |
16 #include "base/task.h" | 16 #include "base/task.h" |
17 #include "base/values.h" | 17 #include "base/values.h" |
| 18 #include "content/common/content_export.h" |
18 #include "content/common/gpu/gpu_feature_flags.h" | 19 #include "content/common/gpu/gpu_feature_flags.h" |
19 #include "content/common/gpu/gpu_info.h" | 20 #include "content/common/gpu/gpu_info.h" |
20 | 21 |
21 class CommandLine; | 22 class CommandLine; |
22 class GpuBlacklist; | 23 class GpuBlacklist; |
23 | 24 |
24 class GpuDataManager { | 25 class CONTENT_EXPORT GpuDataManager { |
25 public: | 26 public: |
26 // Getter for the singleton. This will return NULL on failure. | 27 // Getter for the singleton. This will return NULL on failure. |
27 static GpuDataManager* GetInstance(); | 28 static GpuDataManager* GetInstance(); |
28 | 29 |
29 // Requests complete GPUinfo if it has not already been requested | 30 // Requests complete GPUinfo if it has not already been requested |
30 void RequestCompleteGpuInfoIfNeeded(); | 31 void RequestCompleteGpuInfoIfNeeded(); |
31 | 32 |
32 // Only update if the current GPUInfo is not finalized. | 33 // Only update if the current GPUInfo is not finalized. |
33 void UpdateGpuInfo(const GPUInfo& gpu_info); | 34 void UpdateGpuInfo(const GPUInfo& gpu_info); |
34 | 35 |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 std::set<Callback0::Type*> gpu_info_update_callbacks_; | 115 std::set<Callback0::Type*> gpu_info_update_callbacks_; |
115 | 116 |
116 ListValue log_messages_; | 117 ListValue log_messages_; |
117 | 118 |
118 DISALLOW_COPY_AND_ASSIGN(GpuDataManager); | 119 DISALLOW_COPY_AND_ASSIGN(GpuDataManager); |
119 }; | 120 }; |
120 | 121 |
121 DISABLE_RUNNABLE_METHOD_REFCOUNT(GpuDataManager); | 122 DISABLE_RUNNABLE_METHOD_REFCOUNT(GpuDataManager); |
122 | 123 |
123 #endif // CONTENT_BROWSER_GPU_GPU_DATA_MANAGER_H_ | 124 #endif // CONTENT_BROWSER_GPU_GPU_DATA_MANAGER_H_ |
OLD | NEW |