chromium/ui/wm/core/focus_controller.cc

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

#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 {

// When a modal window is activated, we bring its entire transient parent chain
// to the front. This function must be called before the modal transient is
// stacked at the top to ensure correct stacking order.
void StackTransientParentsBelowModalWindow(aura::Window* window) {}

}  // namespace

////////////////////////////////////////////////////////////////////////////////
// FocusController, public:

FocusController::FocusController(FocusRules* rules)
    :{}

FocusController::~FocusController() = default;

////////////////////////////////////////////////////////////////////////////////
// FocusController, ActivationClient implementation:

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 {}

////////////////////////////////////////////////////////////////////////////////
// FocusController, aura::client::FocusClient implementation:

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() {}

////////////////////////////////////////////////////////////////////////////////
// FocusController, ui::EventHandler implementation:
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 {}

////////////////////////////////////////////////////////////////////////////////
// FocusController, aura::WindowObserver implementation:

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) {}

////////////////////////////////////////////////////////////////////////////////
// FocusController, private:

void FocusController::FocusAndActivateWindow(
    ActivationChangeObserver::ActivationReason reason,
    aura::Window* window,
    bool no_stacking) {}

void FocusController::SetFocusedWindow(aura::Window* window) {}

// Defines a macro that is meant to be called from SetActiveWindow(), which
// checks whether the activation was interrupted by checking whether
// |pending_activation_| has a value or not. In this case, it early-outs from
// the SetActiveWindow() stack.
// clang-format off
#define MAYBE_ACTIVATION_INTERRUPTED()
// clang-format on

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) {}

}  // namespace wm