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_FOCUS_CHANGE_OBSERVER_H_ 6#define UI_AURA_CLIENT_FOCUS_CHANGE_OBSERVER_H_ 7 8#include "ui/aura/aura_export.h" 9 10namespace aura { 11class Window; 12namespace client { 13 14// TODO(beng): this interface will be OBSOLETE by FocusChangeEvent. 15class AURA_EXPORT FocusChangeObserver { 16 public: 17 // Called when focus moves from |lost_focus| to |gained_focus|. 18 virtual void OnWindowFocused(Window* gained_focus, Window* lost_focus) = 0; 19 20 protected: 21 virtual ~FocusChangeObserver() {} 22}; 23 24AURA_EXPORT FocusChangeObserver* GetFocusChangeObserver(Window* window); 25AURA_EXPORT void SetFocusChangeObserver( 26 Window* window, 27 FocusChangeObserver* focus_change_observer); 28 29 30} // namespace client 31} // namespace aura 32 33#endif // UI_AURA_CLIENT_FOCUS_CHANGE_OBSERVER_H_ 34