Infobar material design refresh: layout
[chromium-blink-merge.git] / chrome / browser / ui / startup / session_crashed_infobar_delegate.h
blob584012fba6f77e31f777673f4b5c18c01fad32be
1 // Copyright (c) 2012 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.
5 #ifndef CHROME_BROWSER_UI_STARTUP_SESSION_CRASHED_INFOBAR_DELEGATE_H_
6 #define CHROME_BROWSER_UI_STARTUP_SESSION_CRASHED_INFOBAR_DELEGATE_H_
8 #include "components/infobars/core/confirm_infobar_delegate.h"
10 class Browser;
11 class Profile;
13 // A delegate for the InfoBar shown when the previous session has crashed.
14 class SessionCrashedInfoBarDelegate : public ConfirmInfoBarDelegate {
15 public:
16 // If |browser| is not incognito, creates a session crashed infobar and
17 // delegate and adds the infobar to the InfoBarService for |browser|.
18 static void Create(Browser* browser);
20 private:
21 explicit SessionCrashedInfoBarDelegate(Profile* profile);
22 ~SessionCrashedInfoBarDelegate() override;
24 // ConfirmInfoBarDelegate:
25 int GetIconId() const override;
26 gfx::VectorIconId GetVectorIconId() const override;
27 base::string16 GetMessageText() const override;
28 int GetButtons() const override;
29 base::string16 GetButtonLabel(InfoBarButton button) const override;
30 bool Accept() override;
32 bool accepted_;
33 Profile* profile_;
35 DISALLOW_COPY_AND_ASSIGN(SessionCrashedInfoBarDelegate);
38 #endif // CHROME_BROWSER_UI_STARTUP_SESSION_CRASHED_INFOBAR_DELEGATE_H_