shutdown_confirmation_dialog.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. // Copyright 2020 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef ASH_SYSTEM_SESSION_SHUTDOWN_CONFIRMATION_DIALOG_H_
  5. #define ASH_SYSTEM_SESSION_SHUTDOWN_CONFIRMATION_DIALOG_H_
  6. #include "base/callback.h"
  7. #include "ui/views/window/dialog_delegate.h"
  8. namespace views {
  9. class Label;
  10. }
  11. namespace ash {
  12. // Defines a dialog for shutdown that require confirmation from users -
  13. // more specifically for the situation where the subsequent boot is slow.
  14. class ShutdownConfirmationDialog : public views::DialogDelegateView {
  15. public:
  16. ShutdownConfirmationDialog(int window_title_text_id,
  17. int dialog_text_id,
  18. base::OnceClosure on_accept_callback,
  19. base::OnceClosure on_cancel_callback);
  20. ShutdownConfirmationDialog(const ShutdownConfirmationDialog&) = delete;
  21. ShutdownConfirmationDialog& operator=(const ShutdownConfirmationDialog&) =
  22. delete;
  23. ~ShutdownConfirmationDialog() override;
  24. // views::View:
  25. gfx::Size CalculatePreferredSize() const override;
  26. private:
  27. views::Label* label_;
  28. };
  29. } // namespace ash
  30. #endif // ASH_SYSTEM_SESSION_SHUTDOWN_CONFIRMATION_DIALOG_H_