| OLD | NEW |
| 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_AUTO_LOGIN_INFOBAR_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_UI_AUTO_LOGIN_INFOBAR_DELEGATE_H_ |
| 6 #define CHROME_BROWSER_UI_AUTO_LOGIN_INFOBAR_DELEGATE_H_ | 6 #define CHROME_BROWSER_UI_AUTO_LOGIN_INFOBAR_DELEGATE_H_ |
| 7 | 7 |
| 8 #include "chrome/browser/infobars/confirm_infobar_delegate.h" | 8 #include "chrome/browser/infobars/confirm_infobar_delegate.h" |
| 9 #include "components/auto_login_parser/auto_login_parser.h" | 9 #include "components/auto_login_parser/auto_login_parser.h" |
| 10 #include "content/public/browser/notification_observer.h" | 10 #include "content/public/browser/notification_observer.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 HISTOGRAM_IGNORED, // The user ignored the infobar. | 55 HISTOGRAM_IGNORED, // The user ignored the infobar. |
| 56 HISTOGRAM_LEARN_MORE, // The user clicked on the learn more link. | 56 HISTOGRAM_LEARN_MORE, // The user clicked on the learn more link. |
| 57 HISTOGRAM_MAX | 57 HISTOGRAM_MAX |
| 58 }; | 58 }; |
| 59 | 59 |
| 60 AutoLoginInfoBarDelegate(InfoBarService* owner, const Params& params); | 60 AutoLoginInfoBarDelegate(InfoBarService* owner, const Params& params); |
| 61 virtual ~AutoLoginInfoBarDelegate(); | 61 virtual ~AutoLoginInfoBarDelegate(); |
| 62 | 62 |
| 63 // ConfirmInfoBarDelegate: | 63 // ConfirmInfoBarDelegate: |
| 64 virtual void InfoBarDismissed() OVERRIDE; | 64 virtual void InfoBarDismissed() OVERRIDE; |
| 65 virtual gfx::Image* GetIcon() const OVERRIDE; | 65 virtual int GetIconID() const OVERRIDE; |
| 66 virtual Type GetInfoBarType() const OVERRIDE; | 66 virtual Type GetInfoBarType() const OVERRIDE; |
| 67 virtual AutoLoginInfoBarDelegate* AsAutoLoginInfoBarDelegate() OVERRIDE; | 67 virtual AutoLoginInfoBarDelegate* AsAutoLoginInfoBarDelegate() OVERRIDE; |
| 68 virtual string16 GetMessageText() const OVERRIDE; | 68 virtual string16 GetMessageText() const OVERRIDE; |
| 69 virtual string16 GetButtonLabel(InfoBarButton button) const OVERRIDE; | 69 virtual string16 GetButtonLabel(InfoBarButton button) const OVERRIDE; |
| 70 virtual bool Accept() OVERRIDE; | 70 virtual bool Accept() OVERRIDE; |
| 71 virtual bool Cancel() OVERRIDE; | 71 virtual bool Cancel() OVERRIDE; |
| 72 | 72 |
| 73 // content::NotificationObserver: | 73 // content::NotificationObserver: |
| 74 virtual void Observe(int type, | 74 virtual void Observe(int type, |
| 75 const content::NotificationSource& source, | 75 const content::NotificationSource& source, |
| 76 const content::NotificationDetails& details) OVERRIDE; | 76 const content::NotificationDetails& details) OVERRIDE; |
| 77 | 77 |
| 78 void RecordHistogramAction(Actions action); | 78 void RecordHistogramAction(Actions action); |
| 79 | 79 |
| 80 const Params params_; | 80 const Params params_; |
| 81 | 81 |
| 82 // Whether any UI controls in the infobar were pressed or not. | 82 // Whether any UI controls in the infobar were pressed or not. |
| 83 bool button_pressed_; | 83 bool button_pressed_; |
| 84 | 84 |
| 85 // For listening to the user signing out. | 85 // For listening to the user signing out. |
| 86 content::NotificationRegistrar registrar_; | 86 content::NotificationRegistrar registrar_; |
| 87 | 87 |
| 88 DISALLOW_COPY_AND_ASSIGN(AutoLoginInfoBarDelegate); | 88 DISALLOW_COPY_AND_ASSIGN(AutoLoginInfoBarDelegate); |
| 89 }; | 89 }; |
| 90 | 90 |
| 91 #endif // CHROME_BROWSER_UI_AUTO_LOGIN_INFOBAR_DELEGATE_H_ | 91 #endif // CHROME_BROWSER_UI_AUTO_LOGIN_INFOBAR_DELEGATE_H_ |
| OLD | NEW |