| Index: components/exo/surface_delegate.h
|
| diff --git a/components/exo/surface_delegate.h b/components/exo/surface_delegate.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..bfda475fc5b18f78c361cf276b499cd8b1088b08
|
| --- /dev/null
|
| +++ b/components/exo/surface_delegate.h
|
| @@ -0,0 +1,26 @@
|
| +// Copyright 2015 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 COMPONENTS_EXO_SURFACE_DELEGATE_H_
|
| +#define COMPONENTS_EXO_SURFACE_DELEGATE_H_
|
| +
|
| +namespace exo {
|
| +
|
| +// Handles events on surfaces in context-specific ways.
|
| +class SurfaceDelegate {
|
| + public:
|
| + // Called when the surface is destroyed. The delegate can use this
|
| + // opportunity to delete itself if necessary.
|
| + virtual void OnSurfaceDestroying() = 0;
|
| +
|
| + // Called when surface was requested to commit all double-buffered state.
|
| + virtual void OnSurfaceCommit() = 0;
|
| +
|
| + protected:
|
| + virtual ~SurfaceDelegate() {}
|
| +};
|
| +
|
| +} // namespace exo
|
| +
|
| +#endif // COMPONENTS_EXO_SURFACE_DELEGATE_H_
|
|
|