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

Side by Side Diff: chrome/browser/gpu/gpu_feature_checker.h

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

Powered by Google App Engine
This is Rietveld 408576698