chromium/ui/wm/core/shadow_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/shadow_controller.h"

#include <utility>

#include "base/check.h"
#include "base/containers/contains.h"
#include "base/containers/flat_set.h"
#include "base/memory/raw_ptr.h"
#include "base/no_destructor.h"
#include "base/scoped_multi_source_observation.h"
#include "build/chromeos_buildflags.h"
#include "ui/aura/client/aura_constants.h"
#include "ui/aura/env.h"
#include "ui/aura/env_observer.h"
#include "ui/aura/window.h"
#include "ui/aura/window_observer.h"
#include "ui/base/class_property.h"
#include "ui/base/ui_base_types.h"
#include "ui/color/color_id.h"
#include "ui/color/color_provider.h"
#include "ui/compositor/layer.h"
#include "ui/wm/core/shadow_controller_delegate.h"
#include "ui/wm/core/shadow_types.h"
#include "ui/wm/core/window_util.h"
#include "ui/wm/public/activation_client.h"

make_pair;

DEFINE_UI_CLASS_PROPERTY_TYPE()
DEFINE_OWNED_UI_CLASS_PROPERTY_KEY()

namespace wm {

namespace {

int GetShadowElevationForActiveState(aura::Window* window) {}

// Returns the shadow style to be applied to |losing_active| when it is losing
// active to |gaining_active|. |gaining_active| may be of a type that hides when
// inactive, and as such we do not want to render |losing_active| as inactive.
int GetShadowElevationForWindowLosingActive(aura::Window* losing_active,
                                            aura::Window* gaining_active) {}

}  // namespace

// ShadowController::Impl ------------------------------------------------------

// Real implementation of the ShadowController. ShadowController observes
// ActivationChangeObserver, which are per ActivationClient, where as there is
// only a single Impl (as it observes all window creation by way of an
// EnvObserver).
class ShadowController::Impl :
      public aura::EnvObserver,
      public aura::WindowObserver,
      public base::RefCounted<Impl> {};

// static
ShadowController::Impl* ShadowController::Impl::GetInstance(aura::Env* env) {}

bool ShadowController::Impl::IsShadowVisibleForWindow(aura::Window* window) {}

void ShadowController::Impl::UpdateShadowForWindow(aura::Window* window) {}

void ShadowController::Impl::OnWindowInitialized(aura::Window* window) {}

void ShadowController::Impl::OnWindowParentChanged(aura::Window* window,
                                                   aura::Window* parent) {}

void ShadowController::Impl::OnWindowPropertyChanged(aura::Window* window,
                                                     const void* key,
                                                     intptr_t old) {}

void ShadowController::Impl::OnWindowVisibilityChanging(aura::Window* window,
                                                        bool visible) {}

void ShadowController::Impl::OnWindowBoundsChanged(
    aura::Window* window,
    const gfx::Rect& old_bounds,
    const gfx::Rect& new_bounds,
    ui::PropertyChangeReason reason) {}

void ShadowController::Impl::OnWindowDestroyed(aura::Window* window) {}

void ShadowController::Impl::OnWindowActivated(ActivationReason reason,
                                               aura::Window* gained_active,
                                               aura::Window* lost_active) {}

bool ShadowController::Impl::ShouldShowShadowForWindow(
    aura::Window* window) const {}

void ShadowController::Impl::MaybeSetShadowRadiusForWindow(
    aura::Window* window) const {}

void ShadowController::Impl::HandlePossibleShadowVisibilityChange(
    aura::Window* window) {}

void ShadowController::Impl::CreateShadowForWindow(aura::Window* window) {}

ShadowController::Impl::Impl(aura::Env* env)
    :{}

ShadowController::Impl::~Impl() {}

// static
base::flat_set<ShadowController::Impl*>*
ShadowController::Impl::GetInstances() {}

// ShadowController ------------------------------------------------------------

ui::Shadow* ShadowController::GetShadowForWindow(aura::Window* window) {}

ui::Shadow::ElevationToColorsMap ShadowController::GenerateShadowColorsMap(
    const ui::ColorProvider* color_provider) {}

ShadowController::ShadowController(
    ActivationClient* activation_client,
    std::unique_ptr<ShadowControllerDelegate> delegate,
    aura::Env* env)
    :{}

ShadowController::~ShadowController() {}

bool ShadowController::IsShadowVisibleForWindow(aura::Window* window) {}

void ShadowController::UpdateShadowForWindow(aura::Window* window) {}

void ShadowController::OnWindowActivated(ActivationReason reason,
                                         aura::Window* gained_active,
                                         aura::Window* lost_active) {}

}  // namespace wm