summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gpu/gl_string_manager.h
blob: f9eb97eef491d9156dfc46920175d18b3a317faf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CHROME_BROWSER_GPU_GL_STRING_MANAGER_H_
#define CHROME_BROWSER_GPU_GL_STRING_MANAGER_H_

#include <string>

#include "base/compiler_specific.h"
#include "content/public/browser/gpu_data_manager_observer.h"

class PrefRegistrySimple;

class GLStringManager : public content::GpuDataManagerObserver {
 public:
  static void RegisterPrefs(PrefRegistrySimple* registry);

  GLStringManager();
  ~GLStringManager() override;

  // Get cached GL strings in local state and send them to GpuDataManager.
  void Initialize();

  // content::GpuDataManagerObserver
  void OnGpuInfoUpdate() override;

 private:
  std::string gl_vendor_;
  std::string gl_renderer_;
  std::string gl_version_;

  DISALLOW_COPY_AND_ASSIGN(GLStringManager);
};

#endif  // CHROME_BROWSER_GPU_GL_STRING_MANAGER_H_