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

Side by Side Diff: content/browser/gpu/gpu_data_manager_impl.h

Issue 1308823002: Move Singleton and related structs to namespace base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ToT Created 5 years, 3 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
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « content/browser/geolocation/location_api_adapter_android.cc ('k') | content/browser/gpu/gpu_data_manager_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698