#include "ui/wm/core/focus_controller.h"
#include <string_view>
#include "base/auto_reset.h"
#include "base/observer_list.h"
#include "ui/aura/client/aura_constants.h"
#include "ui/aura/client/capture_client.h"
#include "ui/aura/client/focus_change_observer.h"
#include "ui/aura/env.h"
#include "ui/aura/window_tracker.h"
#include "ui/base/mojom/ui_base_types.mojom-shared.h"
#include "ui/base/ui_base_features.h"
#include "ui/events/event.h"
#include "ui/wm/core/focus_rules.h"
#include "ui/wm/core/window_util.h"
#include "ui/wm/public/activation_change_observer.h"
namespace wm {
namespace {
void StackTransientParentsBelowModalWindow(aura::Window* window) { … }
}
FocusController::FocusController(FocusRules* rules)
: … { … }
FocusController::~FocusController() = default;
void FocusController::AddObserver(ActivationChangeObserver* observer) { … }
void FocusController::RemoveObserver(ActivationChangeObserver* observer) { … }
void FocusController::ActivateWindow(aura::Window* window) { … }
void FocusController::DeactivateWindow(aura::Window* window) { … }
const aura::Window* FocusController::GetActiveWindow() const { … }
aura::Window* FocusController::GetActivatableWindow(
aura::Window* window) const { … }
const aura::Window* FocusController::GetToplevelWindow(
const aura::Window* window) const { … }
bool FocusController::CanActivateWindow(const aura::Window* window) const { … }
void FocusController::AddObserver(aura::client::FocusChangeObserver* observer) { … }
void FocusController::RemoveObserver(
aura::client::FocusChangeObserver* observer) { … }
void FocusController::FocusWindow(aura::Window* window) { … }
void FocusController::ResetFocusWithinActiveWindow(aura::Window* window) { … }
aura::Window* FocusController::GetFocusedWindow() { … }
void FocusController::OnKeyEvent(ui::KeyEvent* event) { … }
void FocusController::OnMouseEvent(ui::MouseEvent* event) { … }
void FocusController::OnScrollEvent(ui::ScrollEvent* event) { … }
void FocusController::OnTouchEvent(ui::TouchEvent* event) { … }
void FocusController::OnGestureEvent(ui::GestureEvent* event) { … }
std::string_view FocusController::GetLogContext() const { … }
void FocusController::OnWindowVisibilityChanged(aura::Window* window,
bool visible) { … }
void FocusController::OnWindowDestroying(aura::Window* window) { … }
void FocusController::OnWindowHierarchyChanging(
const HierarchyChangeParams& params) { … }
void FocusController::OnWindowHierarchyChanged(
const HierarchyChangeParams& params) { … }
void FocusController::FocusAndActivateWindow(
ActivationChangeObserver::ActivationReason reason,
aura::Window* window,
bool no_stacking) { … }
void FocusController::SetFocusedWindow(aura::Window* window) { … }
#define MAYBE_ACTIVATION_INTERRUPTED() …
bool FocusController::SetActiveWindow(
ActivationChangeObserver::ActivationReason reason,
aura::Window* requested_window,
aura::Window* window,
bool no_stacking) { … }
void FocusController::StackActiveWindow() { … }
void FocusController::WindowLostFocusFromDispositionChange(aura::Window* window,
aura::Window* next) { … }
void FocusController::WindowFocusedFromInputEvent(aura::Window* window,
const ui::Event* event) { … }
}