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 UI_AURA_CLIENT_CAPTURE_DELEGATE_H_
6#define UI_AURA_CLIENT_CAPTURE_DELEGATE_H_
7
8#include "ui/aura/aura_export.h"
9
10namespace aura {
11class Window;
12namespace client {
13
14// This interface provides API to change the root Window's capture state without
15// exposing them as RootWindow API.
16class AURA_EXPORT CaptureDelegate {
17 public:
18  // Called when a capture is set on |new_capture| and/or a capture is
19  // released on |old_capture|.
20  // NOTE: |old_capture| and |new_capture| are not necessarily contained in the
21  // window hierarchy of the delegate.
22  virtual void UpdateCapture(aura::Window* old_capture,
23                             aura::Window* new_capture) = 0;
24
25  // Called when another root gets capture.
26  virtual void OnOtherRootGotCapture() = 0;
27
28  // Sets/Release a native capture on host windows.
29  virtual void SetNativeCapture() = 0;
30  virtual void ReleaseNativeCapture() = 0;
31
32 protected:
33  virtual ~CaptureDelegate() {}
34};
35
36}  // namespace client
37}  // namespace aura
38
39#endif  // UI_AURA_CLIENT_CAPTURE_DELEGATE_H_
40