#include "chrome/browser/ui/views/policy/idle_dialog_view.h"
#include <algorithm>
#include <string>
#include <utility>
#include "base/functional/bind.h"
#include "base/metrics/user_metrics.h"
#include "base/metrics/user_metrics_action.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/views/chrome_layout_provider.h"
#include "chrome/grit/branded_strings.h"
#include "chrome/grit/generated_resources.h"
#include "components/constrained_window/constrained_window_views.h"
#include "components/vector_icons/vector_icons.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/models/image_model.h"
#include "ui/base/mojom/dialog_button.mojom.h"
#include "ui/base/mojom/ui_base_types.mojom-shared.h"
#include "ui/base/ui_base_types.h"
#include "ui/gfx/color_palette.h"
#include "ui/gfx/geometry/insets.h"
#include "ui/gfx/geometry/point.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/paint_vector_icon.h"
#include "ui/gfx/text_constants.h"
#include "ui/views/border.h"
#include "ui/views/controls/label.h"
#include "ui/views/layout/box_layout.h"
#include "ui/views/layout/layout_provider.h"
#include "ui/views/style/typography.h"
#include "ui/views/view.h"
#include "ui/views/widget/widget.h"
namespace {
static constexpr int kLabelSpacing = …;
std::unique_ptr<views::Label> CreateLabel() { … }
}
base::WeakPtr<views::Widget> IdleDialog::Show(
Browser* browser,
base::TimeDelta dialog_duration,
base::TimeDelta idle_threshold,
IdleDialog::ActionSet actions,
base::OnceClosure on_close_by_user) { … }
namespace policy {
base::WeakPtr<views::Widget> IdleDialogView::Show(
Browser* browser,
base::TimeDelta dialog_duration,
base::TimeDelta idle_threshold,
IdleDialog::ActionSet actions,
base::OnceClosure on_close_by_user) { … }
IdleDialogView::~IdleDialogView() = default;
std::u16string IdleDialogView::GetWindowTitle() const { … }
ui::ImageModel IdleDialogView::GetWindowIcon() { … }
IdleDialogView::IdleDialogView(base::TimeDelta dialog_duration,
base::TimeDelta idle_threshold,
IdleDialog::ActionSet actions,
base::OnceClosure on_close_by_user)
: … { … }
void IdleDialogView::UpdateCountdown() { … }
}