chromium/ui/views/focus/widget_focus_manager.h

// Copyright 2011 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef UI_VIEWS_FOCUS_WIDGET_FOCUS_MANAGER_H_
#define UI_VIEWS_FOCUS_WIDGET_FOCUS_MANAGER_H_

#include "base/no_destructor.h"
#include "base/observer_list.h"
#include "base/scoped_observation_traits.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/views/views_export.h"

namespace views {

// This interface should be implemented by classes that want to be notified when
// the native focus is about to change.  Listeners implementing this interface
// will be invoked for all native focus changes across the entire Chrome
// application.  FocusChangeListeners are only called for changes within the
// children of a single top-level native-view.
class WidgetFocusChangeListener {};

class VIEWS_EXPORT WidgetFocusManager {};

// A basic helper class that is used to disable native focus change
// notifications within a scope.
class VIEWS_EXPORT AutoNativeNotificationDisabler {};

}  // namespace views

namespace base {

// Specialization for use with base::ScopedObservation:
template <>
struct ScopedObservationTraits<views::WidgetFocusManager,
                               views::WidgetFocusChangeListener> {};

}  // namespace base

#endif  // UI_VIEWS_FOCUS_WIDGET_FOCUS_MANAGER_H_