blob: af91451a85019f1a266ea246cd34af6cb83b12d1 [file] [log] [blame]
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ash/ash_export.h"
#include "base/callback_forward.h"
#include "base/macros.h"
#include "ui/views/animation/ink_drop_observer.h"
#include "ui/views/animation/ink_drop_state.h"
#include "ui/views/widget/widget_delegate.h"
namespace ash {
// Widget delegate view that implements the contents of the lock action
// background widget.
// The widget hosts a view that contains a transparent view with a black ink
// drop. The view implementation provides methods to activate or hide the ink
// drop in the view.
class ASH_EXPORT LockScreenActionBackgroundView
: public views::WidgetDelegateView,
public views::InkDropObserver {
~LockScreenActionBackgroundView() override;
// Request the ink drop to be activated.
// |done| - called when the ink drop animation ends.
void AnimateShow(base::OnceClosure done);
// Requests the ink drop to be hidden.
// |done| - called when the ink drop animation ends.
void AnimateHide(base::OnceClosure done);
// views::InkDropListener:
void InkDropAnimationStarted() override;
void InkDropRippleAnimationEnded(views::InkDropState state) override;
// views::WidgetDelegateView:
bool CanMaximize() const override;
bool CanActivate() const override;
friend class LockScreenActionBackgroundViewTestApi;
class NoteBackground;
// Gets background_ as a views::View*.
views::View* GetBackgroundView();
base::OnceClosure animation_end_callback_;
views::InkDropState animating_to_state_;
NoteBackground* background_ = nullptr;
} // namespace ash