| 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_WEBUI_APP_LAUNCHER_LOGIN_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_APP_LAUNCHER_LOGIN_HANDLER_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_APP_LAUNCHER_LOGIN_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_APP_LAUNCHER_LOGIN_HANDLER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 // Called from JS when the NTP is loaded. |args| is the list of arguments | 47 // Called from JS when the NTP is loaded. |args| is the list of arguments |
| 48 // passed from JS and should be an empty list. | 48 // passed from JS and should be an empty list. |
| 49 void HandleInitializeSyncLogin(const base::ListValue* args); | 49 void HandleInitializeSyncLogin(const base::ListValue* args); |
| 50 | 50 |
| 51 // Called from JS when the user clicks the login container. It shows the | 51 // Called from JS when the user clicks the login container. It shows the |
| 52 // appropriate UI based on the current sync state. |args| is the list of | 52 // appropriate UI based on the current sync state. |args| is the list of |
| 53 // arguments passed from JS and should be an empty list. | 53 // arguments passed from JS and should be an empty list. |
| 54 void HandleShowSyncLoginUI(const base::ListValue* args); | 54 void HandleShowSyncLoginUI(const base::ListValue* args); |
| 55 | 55 |
| 56 // Records actions in SyncPromo.NTPPromo histogram. | 56 // Records actions in SyncPromo.NTPPromo histogram. |
| 57 void RecordInHistogram(int type); | 57 void RecordInHistogram(NTPSignInPromoBuckets type); |
| 58 | 58 |
| 59 // Called from JS when the sync promo NTP bubble has been displayed. |args| is | 59 // Called from JS when the sync promo NTP bubble has been displayed. |args| is |
| 60 // the list of arguments passed from JS and should be an empty list. | 60 // the list of arguments passed from JS and should be an empty list. |
| 61 void HandleLoginMessageSeen(const base::ListValue* args); | 61 void HandleLoginMessageSeen(const base::ListValue* args); |
| 62 | 62 |
| 63 // Called from JS when the user clicks on the advanced link the sync promo NTP | 63 // Called from JS when the user clicks on the advanced link the sync promo NTP |
| 64 // bubble. Use use this to navigate to the sync settings page. |args| is the | 64 // bubble. Use use this to navigate to the sync settings page. |args| is the |
| 65 // list of arguments passed from JS and should be an empty list. | 65 // list of arguments passed from JS and should be an empty list. |
| 66 void HandleShowAdvancedLoginUI(const base::ListValue* args); | 66 void HandleShowAdvancedLoginUI(const base::ListValue* args); |
| 67 | 67 |
| 68 // Internal helper method | 68 // Internal helper method |
| 69 void UpdateLogin(); | 69 void UpdateLogin(); |
| 70 | 70 |
| 71 // Watches this web UI's profile for info changes (e.g. authenticated username | 71 // Watches this web UI's profile for info changes (e.g. authenticated username |
| 72 // changes). | 72 // changes). |
| 73 std::unique_ptr<ProfileInfoWatcher> profile_info_watcher_; | 73 std::unique_ptr<ProfileInfoWatcher> profile_info_watcher_; |
| 74 | 74 |
| 75 DISALLOW_COPY_AND_ASSIGN(AppLauncherLoginHandler); | 75 DISALLOW_COPY_AND_ASSIGN(AppLauncherLoginHandler); |
| 76 }; | 76 }; |
| 77 | 77 |
| 78 #endif // CHROME_BROWSER_UI_WEBUI_APP_LAUNCHER_LOGIN_HANDLER_H_ | 78 #endif // CHROME_BROWSER_UI_WEBUI_APP_LAUNCHER_LOGIN_HANDLER_H_ |
| OLD | NEW |