Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(283)

Side by Side Diff: chrome/browser/ui/startup/session_crashed_prompt.h

Issue 15067008: [InfoBar] Add InfoBarDelegate::GetIconID() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nit fixes redux Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_STARTUP_SESSION_CRASHED_PROMPT_H_ 5 #ifndef CHROME_BROWSER_UI_STARTUP_SESSION_CRASHED_PROMPT_H_
6 #define CHROME_BROWSER_UI_STARTUP_SESSION_CRASHED_PROMPT_H_ 6 #define CHROME_BROWSER_UI_STARTUP_SESSION_CRASHED_PROMPT_H_
7 7
8 #include "chrome/browser/infobars/confirm_infobar_delegate.h" 8 #include "chrome/browser/infobars/confirm_infobar_delegate.h"
9 #include "content/public/browser/notification_observer.h" 9 #include "content/public/browser/notification_observer.h"
10 #include "content/public/browser/notification_registrar.h" 10 #include "content/public/browser/notification_registrar.h"
11 11
12 class Browser; 12 class Browser;
13 class Profile; 13 class Profile;
14 14
15 // A delegate for the InfoBar shown when the previous session has crashed. 15 // A delegate for the InfoBar shown when the previous session has crashed.
16 class SessionCrashedInfoBarDelegate : public ConfirmInfoBarDelegate, 16 class SessionCrashedInfoBarDelegate : public ConfirmInfoBarDelegate,
17 public content::NotificationObserver { 17 public content::NotificationObserver {
18 public: 18 public:
19 // If |browser| is not incognito, creates a session crashed delegate and adds 19 // If |browser| is not incognito, creates a session crashed delegate and adds
20 // it to the InfoBarService for |browser|. 20 // it to the InfoBarService for |browser|.
21 static void Create(Browser* browser); 21 static void Create(Browser* browser);
22 22
23 private: 23 private:
24 SessionCrashedInfoBarDelegate(InfoBarService* infobar_service, 24 SessionCrashedInfoBarDelegate(InfoBarService* infobar_service,
25 Browser* browser); 25 Browser* browser);
26 virtual ~SessionCrashedInfoBarDelegate(); 26 virtual ~SessionCrashedInfoBarDelegate();
27 27
28 // ConfirmInfoBarDelegate: 28 // ConfirmInfoBarDelegate:
29 virtual gfx::Image* GetIcon() const OVERRIDE; 29 virtual int GetIconID() const OVERRIDE;
30 virtual string16 GetMessageText() const OVERRIDE; 30 virtual string16 GetMessageText() const OVERRIDE;
31 virtual int GetButtons() const OVERRIDE; 31 virtual int GetButtons() const OVERRIDE;
32 virtual string16 GetButtonLabel(InfoBarButton button) const OVERRIDE; 32 virtual string16 GetButtonLabel(InfoBarButton button) const OVERRIDE;
33 virtual bool Accept() OVERRIDE; 33 virtual bool Accept() OVERRIDE;
34 34
35 // content::NotificationObserver: 35 // content::NotificationObserver:
36 virtual void Observe(int type, 36 virtual void Observe(int type,
37 const content::NotificationSource& source, 37 const content::NotificationSource& source,
38 const content::NotificationDetails& details) OVERRIDE; 38 const content::NotificationDetails& details) OVERRIDE;
39 39
40 content::NotificationRegistrar registrar_; 40 content::NotificationRegistrar registrar_;
41 bool accepted_; 41 bool accepted_;
42 bool removed_notification_received_; 42 bool removed_notification_received_;
43 Profile* profile_; 43 Profile* profile_;
44 44
45 DISALLOW_COPY_AND_ASSIGN(SessionCrashedInfoBarDelegate); 45 DISALLOW_COPY_AND_ASSIGN(SessionCrashedInfoBarDelegate);
46 }; 46 };
47 47
48 #endif // CHROME_BROWSER_UI_STARTUP_SESSION_CRASHED_PROMPT_H_ 48 #endif // CHROME_BROWSER_UI_STARTUP_SESSION_CRASHED_PROMPT_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/startup/default_browser_prompt.cc ('k') | chrome/browser/ui/startup/session_crashed_prompt.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698