forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathaccelerator_confirmation_dialog.h
36 lines (27 loc) · 1.23 KB
/
accelerator_confirmation_dialog.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// Copyright (c) 2018 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.
#ifndef ASH_ACCELERATORS_ACCELERATOR_CONFIRMATION_DIALOG_H_
#define ASH_ACCELERATORS_ACCELERATOR_CONFIRMATION_DIALOG_H_
#include "base/callback_forward.h"
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "base/strings/string16.h"
#include "ui/views/window/dialog_delegate.h"
namespace ash {
// Defines a dialog for accelerators that require confirmation from users prior
// to perform.
class AcceleratorConfirmationDialog : public views::DialogDelegateView {
public:
AcceleratorConfirmationDialog(int window_title_text_id,
int dialog_text_id,
base::OnceClosure on_accept_callback,
base::OnceClosure on_cancel_callback);
~AcceleratorConfirmationDialog() override;
base::WeakPtr<AcceleratorConfirmationDialog> GetWeakPtr();
private:
base::WeakPtrFactory<AcceleratorConfirmationDialog> weak_ptr_factory_{this};
DISALLOW_COPY_AND_ASSIGN(AcceleratorConfirmationDialog);
};
} // namespace ash
#endif // ASH_ACCELERATORS_ACCELERATOR_CONFIRMATION_DIALOG_H_