forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathextension_dialog_auto_confirm.h
36 lines (26 loc) · 1.04 KB
/
extension_dialog_auto_confirm.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 2015 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 EXTENSIONS_BROWSER_EXTENSION_DIALOG_AUTO_CONFIRM_H_
#define EXTENSIONS_BROWSER_EXTENSION_DIALOG_AUTO_CONFIRM_H_
#include "base/auto_reset.h"
#include "base/macros.h"
namespace extensions {
class ScopedTestDialogAutoConfirm {
public:
enum AutoConfirm {
NONE, // The prompt will show normally.
ACCEPT, // The prompt will always accept.
ACCEPT_AND_OPTION, // The prompt will always check an option (if any)
// and accept.
CANCEL, // The prompt will always cancel.
};
explicit ScopedTestDialogAutoConfirm(AutoConfirm override_value);
~ScopedTestDialogAutoConfirm();
static AutoConfirm GetAutoConfirmValue();
private:
AutoConfirm old_value_;
DISALLOW_COPY_AND_ASSIGN(ScopedTestDialogAutoConfirm);
};
} // namespace extensions
#endif // EXTENSIONS_BROWSER_EXTENSION_DIALOG_AUTO_CONFIRM_H_