summaryrefslogtreecommitdiffstats
path: root/ui/wm/public/activation_delegate.h
blob: 5fe5d532476bfe94730c49bcab4b58658f55c137 (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 UI_WM_PUBLIC_ACTIVATION_DELEGATE_H_
#define UI_WM_PUBLIC_ACTIVATION_DELEGATE_H_

#include "ui/wm/wm_export.h"

namespace ui {
class Event;
}

namespace aura {
class Window;
namespace client {

// An interface implemented by an object that configures and responds to changes
// to a window's activation state.
class WM_EXPORT ActivationDelegate {
 public:
  // Returns true if the window should be activated.
  virtual bool ShouldActivate() const = 0;

 protected:
  virtual ~ActivationDelegate() {}
};

// Sets/Gets the ActivationDelegate on the Window. No ownership changes.
WM_EXPORT void SetActivationDelegate(Window* window,
                                     ActivationDelegate* delegate);
WM_EXPORT ActivationDelegate* GetActivationDelegate(Window* window);

}  // namespace client
}  // namespace aura

#endif  // UI_WM_PUBLIC_ACTIVATION_DELEGATE_H_