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

Side by Side Diff: chrome/browser/gpu/gpu_feature_checker.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
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 CHROME_BROWSER_GPU_GPU_FEATURE_CHECKER_H_ 5 #ifndef CHROME_BROWSER_GPU_GPU_FEATURE_CHECKER_H_
6 #define CHROME_BROWSER_GPU_GPU_FEATURE_CHECKER_H_ 6 #define CHROME_BROWSER_GPU_GPU_FEATURE_CHECKER_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/memory/ref_counted.h"
9 #include "content/public/browser/gpu_data_manager_observer.h" 10 #include "content/public/browser/gpu_data_manager_observer.h"
10 #include "content/public/common/gpu_feature_type.h" 11 #include "gpu/config/gpu_feature_type.h"
11 #include "base/memory/ref_counted.h"
12 12
13 namespace content { 13 namespace content {
14 class GpuDataManager; 14 class GpuDataManager;
15 } // namespace content 15 } // namespace content
16 16
17 class GPUFeatureChecker : public base::RefCountedThreadSafe<GPUFeatureChecker>, 17 class GPUFeatureChecker : public base::RefCountedThreadSafe<GPUFeatureChecker>,
18 public content::GpuDataManagerObserver { 18 public content::GpuDataManagerObserver {
19 public: 19 public:
20 typedef base::Callback<void(bool feature_available)> FeatureAvailableCallback; 20 typedef base::Callback<void(bool feature_available)> FeatureAvailableCallback;
21 21
22 GPUFeatureChecker(content::GpuFeatureType feature, 22 GPUFeatureChecker(gpu::GpuFeatureType feature,
23 FeatureAvailableCallback callback); 23 FeatureAvailableCallback callback);
24 24
25 // Check to see if |feature_| is available on the current GPU. |callback_| 25 // Check to see if |feature_| is available on the current GPU. |callback_|
26 // will be called to indicate the availability of the feature. Must be called 26 // will be called to indicate the availability of the feature. Must be called
27 // from the the UI thread. 27 // from the the UI thread.
28 void CheckGPUFeatureAvailability(); 28 void CheckGPUFeatureAvailability();
29 29
30 // content::GpuDataManagerObserver 30 // content::GpuDataManagerObserver
31 virtual void OnGpuInfoUpdate() OVERRIDE; 31 virtual void OnGpuInfoUpdate() OVERRIDE;
32 private: 32 private:
33 friend class base::RefCountedThreadSafe<GPUFeatureChecker>; 33 friend class base::RefCountedThreadSafe<GPUFeatureChecker>;
34 34
35 virtual ~GPUFeatureChecker(); 35 virtual ~GPUFeatureChecker();
36 36
37 content::GpuFeatureType feature_; 37 gpu::GpuFeatureType feature_;
38 FeatureAvailableCallback callback_; 38 FeatureAvailableCallback callback_;
39 39
40 DISALLOW_COPY_AND_ASSIGN(GPUFeatureChecker); 40 DISALLOW_COPY_AND_ASSIGN(GPUFeatureChecker);
41 }; 41 };
42 42
43 #endif // CHROME_BROWSER_GPU_GPU_FEATURE_CHECKER_H_ 43 #endif // CHROME_BROWSER_GPU_GPU_FEATURE_CHECKER_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/requirements_checker_browsertest.cc ('k') | chrome/browser/gpu/gpu_feature_checker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698