| 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" |
| 11 #include "content/public/browser/web_ui_message_handler.h" | 11 #include "content/public/browser/web_ui_message_handler.h" |
| 12 | 12 |
| 13 class Profile; | 13 class Profile; |
| 14 class ProfileInfoWatcher; | 14 class ProfileInfoWatcher; |
| 15 | 15 |
| 16 namespace base { |
| 17 class DictionaryValue; |
| 18 } |
| 19 |
| 16 // The login handler currently simply displays the current logged in | 20 // The login handler currently simply displays the current logged in |
| 17 // username at the top of the NTP (and update itself when that changes). | 21 // username at the top of the NTP (and update itself when that changes). |
| 18 // In the future it may expand to allow users to login from the NTP. | 22 // In the future it may expand to allow users to login from the NTP. |
| 19 class AppLauncherLoginHandler : public content::WebUIMessageHandler { | 23 class AppLauncherLoginHandler : public content::WebUIMessageHandler { |
| 20 public: | 24 public: |
| 21 AppLauncherLoginHandler(); | 25 AppLauncherLoginHandler(); |
| 22 ~AppLauncherLoginHandler() override; | 26 ~AppLauncherLoginHandler() override; |
| 23 | 27 |
| 24 // WebUIMessageHandler implementation: | 28 // WebUIMessageHandler implementation: |
| 25 void RegisterMessages() override; | 29 void RegisterMessages() override; |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 void UpdateLogin(); | 69 void UpdateLogin(); |
| 66 | 70 |
| 67 // 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 |
| 68 // changes). | 72 // changes). |
| 69 std::unique_ptr<ProfileInfoWatcher> profile_info_watcher_; | 73 std::unique_ptr<ProfileInfoWatcher> profile_info_watcher_; |
| 70 | 74 |
| 71 DISALLOW_COPY_AND_ASSIGN(AppLauncherLoginHandler); | 75 DISALLOW_COPY_AND_ASSIGN(AppLauncherLoginHandler); |
| 72 }; | 76 }; |
| 73 | 77 |
| 74 #endif // CHROME_BROWSER_UI_WEBUI_APP_LAUNCHER_LOGIN_HANDLER_H_ | 78 #endif // CHROME_BROWSER_UI_WEBUI_APP_LAUNCHER_LOGIN_HANDLER_H_ |
| OLD | NEW |