chromium/ui/views/widget/any_widget_observer.cc

// Copyright 2020 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/views/widget/any_widget_observer.h"

#include <utility>

#include "base/functional/bind.h"
#include "ui/views/widget/any_widget_observer_singleton.h"
#include "ui/views/widget/widget.h"

namespace views {

AnyWidgetObserver::AnyWidgetObserver(AnyWidgetPasskey passkey)
    :{}
AnyWidgetObserver::AnyWidgetObserver(test::AnyWidgetTestPasskey passkey)
    :{}

AnyWidgetObserver::AnyWidgetObserver() {}

AnyWidgetObserver::~AnyWidgetObserver() {}

#define PROPAGATE_NOTIFICATION

PROPAGATE_NOTIFICATION(OnAnyWidgetInitialized, initialized_callback_)
PROPAGATE_NOTIFICATION(OnAnyWidgetShown, shown_callback_)
PROPAGATE_NOTIFICATION(OnAnyWidgetHidden, hidden_callback_)
PROPAGATE_NOTIFICATION(OnAnyWidgetClosing, closing_callback_)

#undef PROPAGATE_NOTIFICATION

NamedWidgetShownWaiter::NamedWidgetShownWaiter(AnyWidgetPasskey passkey,
                                               const std::string& name)
    :{}

NamedWidgetShownWaiter::NamedWidgetShownWaiter(
    test::AnyWidgetTestPasskey passkey,
    const std::string& name)
    :{}

NamedWidgetShownWaiter::~NamedWidgetShownWaiter() = default;

Widget* NamedWidgetShownWaiter::WaitIfNeededAndGet() {}

NamedWidgetShownWaiter::NamedWidgetShownWaiter(const std::string& name)
    :{}

void NamedWidgetShownWaiter::OnAnyWidgetShown(Widget* widget) {}

AnyWidgetPasskey::AnyWidgetPasskey() = default;

}  // namespace views