OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_AUTOLOGIN_INFOBAR_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_UI_AUTOLOGIN_INFOBAR_DELEGATE_H_ |
6 #define CHROME_BROWSER_UI_AUTOLOGIN_INFOBAR_DELEGATE_H_ | 6 #define CHROME_BROWSER_UI_AUTOLOGIN_INFOBAR_DELEGATE_H_ |
7 | 7 |
8 #include "chrome/browser/tab_contents/confirm_infobar_delegate.h" | 8 #include "chrome/browser/tab_contents/confirm_infobar_delegate.h" |
9 #include "content/common/notification_observer.h" | 9 #include "content/common/notification_observer.h" |
10 #include "content/common/notification_registrar.h" | 10 #include "content/common/notification_registrar.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 // stored tokens that would allow a one-click login. | 21 // stored tokens that would allow a one-click login. |
22 class AutoLoginInfoBarDelegate : public ConfirmInfoBarDelegate, | 22 class AutoLoginInfoBarDelegate : public ConfirmInfoBarDelegate, |
23 public NotificationObserver { | 23 public NotificationObserver { |
24 public: | 24 public: |
25 AutoLoginInfoBarDelegate(TabContentsWrapper* tab_contents_wrapper, | 25 AutoLoginInfoBarDelegate(TabContentsWrapper* tab_contents_wrapper, |
26 const std::string& account, | 26 const std::string& account, |
27 const std::string& args); | 27 const std::string& args); |
28 | 28 |
29 virtual ~AutoLoginInfoBarDelegate(); | 29 virtual ~AutoLoginInfoBarDelegate(); |
30 | 30 |
31 // Register preferences used by auto-login feature. | |
32 static void RegisterUserPrefs(PrefService* user_prefs); | |
33 | |
34 // Looks for the X-Auto-Login response header in the request, and if found, | 31 // Looks for the X-Auto-Login response header in the request, and if found, |
35 // displays an infobar in the tab contents identified by the child/route id | 32 // displays an infobar in the tab contents identified by the child/route id |
36 // if possible. | 33 // if possible. |
37 static void ShowIfAutoLoginRequested(net::URLRequest* request, | 34 static void ShowIfAutoLoginRequested(net::URLRequest* request, |
38 int child_id, | 35 int child_id, |
39 int route_id); | 36 int route_id); |
40 | 37 |
41 private: | 38 private: |
42 // ConfirmInfoBarDelegate overrides. | 39 // ConfirmInfoBarDelegate overrides. |
43 virtual gfx::Image* GetIcon() const OVERRIDE; | 40 virtual gfx::Image* GetIcon() const OVERRIDE; |
(...skipping 18 matching lines...) Expand all Loading... |
62 | 59 |
63 TabContentsWrapper* tab_contents_wrapper_; | 60 TabContentsWrapper* tab_contents_wrapper_; |
64 const std::string account_; | 61 const std::string account_; |
65 const std::string args_; | 62 const std::string args_; |
66 NotificationRegistrar registrar_; | 63 NotificationRegistrar registrar_; |
67 | 64 |
68 DISALLOW_COPY_AND_ASSIGN(AutoLoginInfoBarDelegate); | 65 DISALLOW_COPY_AND_ASSIGN(AutoLoginInfoBarDelegate); |
69 }; | 66 }; |
70 | 67 |
71 #endif // CHROME_BROWSER_UI_AUTOLOGIN_INFOBAR_DELEGATE_H_ | 68 #endif // CHROME_BROWSER_UI_AUTOLOGIN_INFOBAR_DELEGATE_H_ |
OLD | NEW |