gpu_data_manager_observer.h revision 5821806d5e7f356e8fa4b058a389a808ea183019
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 CONTENT_PUBLIC_BROWSER_GPU_DATA_MANAGER_OBSERVER_H_
6#define CONTENT_PUBLIC_BROWSER_GPU_DATA_MANAGER_OBSERVER_H_
7
8#include "content/common/content_export.h"
9#include "content/public/common/gpu_memory_stats.h"
10
11namespace content {
12
13// Observers can register themselves via GpuDataManager::AddObserver, and
14// can un-register with GpuDataManager::RemoveObserver.
15class GpuDataManagerObserver {
16 public:
17  // Called for any observers whenever there is a GPU info update.
18  virtual void OnGpuInfoUpdate() = 0;
19
20  // Called for any observers whenever there is a GPU video memory update.
21  virtual void OnVideoMemoryUsageStatsUpdate(
22      const GPUVideoMemoryUsageStats& video_memory_usage_stats) = 0;
23
24 protected:
25  virtual ~GpuDataManagerObserver() {}
26};
27
28};  // namespace content
29
30#endif  // CONTENT_PUBLIC_BROWSER_GPU_DATA_MANAGER_OBSERVER_H_
31