summaryrefslogtreecommitdiffstats
path: root/chromium/components/exo/sub_surface_observer.h
blob: ded9720c666ce332436e63c614b20d7e7a26ca30 (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
// Copyright 2021 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef COMPONENTS_EXO_SUB_SURFACE_OBSERVER_H_
#define COMPONENTS_EXO_SUB_SURFACE_OBSERVER_H_

#include "base/observer_list_types.h"

namespace exo {
class SubSurface;

// Observers can listen to various events on the SubSurfaces.
class SubSurfaceObserver : public base::CheckedObserver {
 public:
  // Called at the top of the sub-surface's destructor, to give observers a
  // chance to remove themselves.
  virtual void OnSubSurfaceDestroying(SubSurface* sub_surface) = 0;

 protected:
  ~SubSurfaceObserver() override = default;
};

}  // namespace exo

#endif  // COMPONENTS_EXO_SUB_SURFACE_OBSERVER_H_