OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2011 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_ACTIVATION_DELEGATE_H_ |
| 6 #define UI_AURA_CLIENT_ACTIVATION_DELEGATE_H_ |
| 7 #pragma once |
| 8 |
| 9 #include "ui/aura/aura_export.h" |
| 10 |
| 11 namespace aura { |
| 12 |
| 13 class Event; |
| 14 |
| 15 // An interface implemented by an object that configures and responds to changes |
| 16 // to a window's activation state. |
| 17 class AURA_EXPORT ActivationDelegate { |
| 18 public: |
| 19 virtual ~ActivationDelegate() {} |
| 20 |
| 21 // Returns true if the window should be activated. |event| is either the mouse |
| 22 // event supplied if the activation is the result of a mouse, or the touch |
| 23 // event if the activation is the result of a touch, or NULL if activation is |
| 24 // attempted for another reason. |
| 25 virtual bool ShouldActivate(Event* event) = 0; |
| 26 |
| 27 // Sent when the window is activated. |
| 28 virtual void OnActivated() = 0; |
| 29 |
| 30 // Sent when the window loses active status. |
| 31 virtual void OnLostActive() = 0; |
| 32 }; |
| 33 |
| 34 } // namespace aura |
| 35 |
| 36 #endif // UI_AURA_CLIENT_ACTIVATION_DELEGATE_H_ |
OLD | NEW |