1 // Copyright 2017 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 
5 #ifndef CHROME_BROWSER_UI_STARTUP_AUTOMATION_INFOBAR_DELEGATE_H_
6 #define CHROME_BROWSER_UI_STARTUP_AUTOMATION_INFOBAR_DELEGATE_H_
7 
8 #include "base/compiler_specific.h"
9 #include "base/strings/string16.h"
10 #include "components/infobars/core/confirm_infobar_delegate.h"
11 #include "url/gurl.h"
12 
13 // An infobar to inform users if their browser is being controlled by an
14 // automated test.
15 class AutomationInfoBarDelegate : public ConfirmInfoBarDelegate {
16  public:
17   static void Create();
18   AutomationInfoBarDelegate(const AutomationInfoBarDelegate&) = delete;
19   AutomationInfoBarDelegate& operator=(const AutomationInfoBarDelegate&) =
20       delete;
21 
22  private:
23   AutomationInfoBarDelegate() = default;
24   ~AutomationInfoBarDelegate() override = default;
25 
26   infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override;
27   bool ShouldExpire(const NavigationDetails& details) const override;
28   bool ShouldAnimate() const override;
29   base::string16 GetMessageText() const override;
30   int GetButtons() const override;
31 };
32 
33 #endif  // CHROME_BROWSER_UI_STARTUP_AUTOMATION_INFOBAR_DELEGATE_H_
34