OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_GPU_GPU_DATA_MANAGER_IMPL_H_ |
6 #define CONTENT_BROWSER_GPU_GPU_DATA_MANAGER_IMPL_H_ | 6 #define CONTENT_BROWSER_GPU_GPU_DATA_MANAGER_IMPL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 bool UpdateActiveGpu(uint32 vendor_id, uint32 device_id); | 178 bool UpdateActiveGpu(uint32 vendor_id, uint32 device_id); |
179 | 179 |
180 // Called when GPU process initialization failed. | 180 // Called when GPU process initialization failed. |
181 void OnGpuProcessInitFailure(); | 181 void OnGpuProcessInitFailure(); |
182 | 182 |
183 bool IsDriverBugWorkaroundActive(int feature) const; | 183 bool IsDriverBugWorkaroundActive(int feature) const; |
184 | 184 |
185 private: | 185 private: |
186 friend class GpuDataManagerImplPrivate; | 186 friend class GpuDataManagerImplPrivate; |
187 friend class GpuDataManagerImplPrivateTest; | 187 friend class GpuDataManagerImplPrivateTest; |
188 friend struct DefaultSingletonTraits<GpuDataManagerImpl>; | 188 friend struct base::DefaultSingletonTraits<GpuDataManagerImpl>; |
189 | 189 |
190 // It's similar to AutoUnlock, but we want to make it a no-op | 190 // It's similar to AutoUnlock, but we want to make it a no-op |
191 // if the owner GpuDataManagerImpl is null. | 191 // if the owner GpuDataManagerImpl is null. |
192 // This should only be used by GpuDataManagerImplPrivate where | 192 // This should only be used by GpuDataManagerImplPrivate where |
193 // callbacks are called, during which re-entering | 193 // callbacks are called, during which re-entering |
194 // GpuDataManagerImpl is possible. | 194 // GpuDataManagerImpl is possible. |
195 class UnlockedSession { | 195 class UnlockedSession { |
196 public: | 196 public: |
197 explicit UnlockedSession(GpuDataManagerImpl* owner) | 197 explicit UnlockedSession(GpuDataManagerImpl* owner) |
198 : owner_(owner) { | 198 : owner_(owner) { |
(...skipping 17 matching lines...) Expand all Loading... |
216 | 216 |
217 mutable base::Lock lock_; | 217 mutable base::Lock lock_; |
218 scoped_ptr<GpuDataManagerImplPrivate> private_; | 218 scoped_ptr<GpuDataManagerImplPrivate> private_; |
219 | 219 |
220 DISALLOW_COPY_AND_ASSIGN(GpuDataManagerImpl); | 220 DISALLOW_COPY_AND_ASSIGN(GpuDataManagerImpl); |
221 }; | 221 }; |
222 | 222 |
223 } // namespace content | 223 } // namespace content |
224 | 224 |
225 #endif // CONTENT_BROWSER_GPU_GPU_DATA_MANAGER_IMPL_H_ | 225 #endif // CONTENT_BROWSER_GPU_GPU_DATA_MANAGER_IMPL_H_ |
OLD | NEW |