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

Side by Side Diff: chrome/browser/ui/auto_login_infobar_delegate.h

Issue 22694006: Infobar system refactor. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years 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 | Annotate | Revision Log
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_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 <string> 8 #include <string>
9 #include "chrome/browser/infobars/confirm_infobar_delegate.h" 9 #include "chrome/browser/infobars/confirm_infobar_delegate.h"
10 #include "components/auto_login_parser/auto_login_parser.h" 10 #include "components/auto_login_parser/auto_login_parser.h"
(...skipping 13 matching lines...) Expand all
24 struct Params { 24 struct Params {
25 // Information from a parsed header. 25 // Information from a parsed header.
26 auto_login_parser::HeaderData header; 26 auto_login_parser::HeaderData header;
27 27
28 // Username to display in the infobar indicating user to be logged in as. 28 // Username to display in the infobar indicating user to be logged in as.
29 // This is initially fetched from sign-in on non-Android platforms. Note 29 // This is initially fetched from sign-in on non-Android platforms. Note
30 // that on Android this field is not used. 30 // that on Android this field is not used.
31 std::string username; 31 std::string username;
32 }; 32 };
33 33
34 // Creates an autologin infobar delegate and adds it to |infobar_service|. 34 // Creates an autologin infobar and delegate and adds the infobar to
35 // |infobar_service|.
35 static void Create(InfoBarService* infobar_service, const Params& params); 36 static void Create(InfoBarService* infobar_service, const Params& params);
36 37
37 protected: 38 protected:
38 AutoLoginInfoBarDelegate(InfoBarService* owner, const Params& params); 39 explicit AutoLoginInfoBarDelegate(const Params& params);
39 virtual ~AutoLoginInfoBarDelegate(); 40 virtual ~AutoLoginInfoBarDelegate();
40 41
41 private: 42 private:
42 // Enum values used for UMA histograms. 43 // Enum values used for UMA histograms.
43 enum Actions { 44 enum Actions {
44 SHOWN, // The infobar was shown to the user. 45 SHOWN, // The infobar was shown to the user.
45 ACCEPTED, // The user pressed the accept button. 46 ACCEPTED, // The user pressed the accept button.
46 REJECTED, // The user pressed the reject button. 47 REJECTED, // The user pressed the reject button.
47 DISMISSED, // The user pressed the close button. 48 DISMISSED, // The user pressed the close button.
48 IGNORED, // The user ignored the infobar. 49 IGNORED, // The user ignored the infobar.
(...skipping 23 matching lines...) Expand all
72 // Whether any UI controls in the infobar were pressed or not. 73 // Whether any UI controls in the infobar were pressed or not.
73 bool button_pressed_; 74 bool button_pressed_;
74 75
75 // For listening to the user signing out. 76 // For listening to the user signing out.
76 content::NotificationRegistrar registrar_; 77 content::NotificationRegistrar registrar_;
77 78
78 DISALLOW_COPY_AND_ASSIGN(AutoLoginInfoBarDelegate); 79 DISALLOW_COPY_AND_ASSIGN(AutoLoginInfoBarDelegate);
79 }; 80 };
80 81
81 #endif // CHROME_BROWSER_UI_AUTO_LOGIN_INFOBAR_DELEGATE_H_ 82 #endif // CHROME_BROWSER_UI_AUTO_LOGIN_INFOBAR_DELEGATE_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/apps/app_metro_infobar_delegate_win.cc ('k') | chrome/browser/ui/auto_login_infobar_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698