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> |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 | 73 |
74 // Gives ownership of the latest blacklist. This is always called on the UI | 74 // Gives ownership of the latest blacklist. This is always called on the UI |
75 // thread. | 75 // thread. |
76 // TODO(zmo): Get rid of preliminary because it should not be exposed to | 76 // TODO(zmo): Get rid of preliminary because it should not be exposed to |
77 // outside GpuDataManager. | 77 // outside GpuDataManager. |
78 void UpdateGpuBlacklist(GpuBlacklist* updated_list, bool preliminary); | 78 void UpdateGpuBlacklist(GpuBlacklist* updated_list, bool preliminary); |
79 | 79 |
80 // This gets called when switching GPU might have happened. | 80 // This gets called when switching GPU might have happened. |
81 void HandleGpuSwitch(); | 81 void HandleGpuSwitch(); |
82 | 82 |
| 83 // Returns the Gpu Info as a DictionaryValue. |
| 84 DictionaryValue* GpuInfoAsDictionaryValue() const; |
| 85 |
83 private: | 86 private: |
84 friend struct DefaultSingletonTraits<GpuDataManager>; | 87 friend struct DefaultSingletonTraits<GpuDataManager>; |
85 | 88 |
86 GpuDataManager(); | 89 GpuDataManager(); |
87 virtual ~GpuDataManager(); | 90 virtual ~GpuDataManager(); |
88 | 91 |
89 // Check if we should go ahead and use gpu blacklist. | 92 // Check if we should go ahead and use gpu blacklist. |
90 // If not, return NULL; otherwise, update and return the current list. | 93 // If not, return NULL; otherwise, update and return the current list. |
91 GpuBlacklist* GetGpuBlacklist(); | 94 GpuBlacklist* GetGpuBlacklist(); |
92 | 95 |
(...skipping 18 matching lines...) Expand all Loading... |
111 std::set<Callback0::Type*> gpu_info_update_callbacks_; | 114 std::set<Callback0::Type*> gpu_info_update_callbacks_; |
112 | 115 |
113 ListValue log_messages_; | 116 ListValue log_messages_; |
114 | 117 |
115 DISALLOW_COPY_AND_ASSIGN(GpuDataManager); | 118 DISALLOW_COPY_AND_ASSIGN(GpuDataManager); |
116 }; | 119 }; |
117 | 120 |
118 DISABLE_RUNNABLE_METHOD_REFCOUNT(GpuDataManager); | 121 DISABLE_RUNNABLE_METHOD_REFCOUNT(GpuDataManager); |
119 | 122 |
120 #endif // CONTENT_BROWSER_GPU_GPU_DATA_MANAGER_H_ | 123 #endif // CONTENT_BROWSER_GPU_GPU_DATA_MANAGER_H_ |
OLD | NEW |