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

Side by Side Diff: chrome/browser/ui/webui/history_login_handler.h

Issue 2191173003: MD History: Get sign in state from backend when refreshing the page (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_HISTORY_LOGIN_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_HISTORY_LOGIN_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_HISTORY_LOGIN_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_HISTORY_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 ProfileInfoWatcher; 13 class ProfileInfoWatcher;
14 14
15 // The handler for login-related messages from chrome://history. 15 // The handler for login-related messages from chrome://history.
16 class HistoryLoginHandler : public content::WebUIMessageHandler { 16 class HistoryLoginHandler : public content::WebUIMessageHandler {
17 public: 17 public:
18 HistoryLoginHandler(); 18 HistoryLoginHandler();
19 ~HistoryLoginHandler() override; 19 ~HistoryLoginHandler() override;
20 20
21 // WebUIMessageHandler implementation. 21 // WebUIMessageHandler implementation.
22 void RegisterMessages() override; 22 void RegisterMessages() override;
23 23
24 private: 24 private:
25 // Handler for the "otherDevicesInitialized" message. No args. 25 // Handler for the "otherDevicesInitialized" message. No args.
26 void HandleOtherDevicesInitialized(const base::ListValue* args); 26 void HandleOtherDevicesInitialized(const base::ListValue* args);
27 27
28 // Handler for the "getSignInState" message. No args.
29 void HandleGetSignInState(const base::ListValue* args);
30
28 // Called by |profile_info_watcher_| on desktop if profile info changes. 31 // Called by |profile_info_watcher_| on desktop if profile info changes.
29 void ProfileInfoChanged(); 32 void ProfileInfoChanged();
30 33
31 // Watches this web UI's profile for info changes (e.g. authenticated username 34 // Watches this web UI's profile for info changes (e.g. authenticated username
32 // changes). 35 // changes).
33 std::unique_ptr<ProfileInfoWatcher> profile_info_watcher_; 36 std::unique_ptr<ProfileInfoWatcher> profile_info_watcher_;
34 37
35 DISALLOW_COPY_AND_ASSIGN(HistoryLoginHandler); 38 DISALLOW_COPY_AND_ASSIGN(HistoryLoginHandler);
36 }; 39 };
37 40
38 #endif // CHROME_BROWSER_UI_WEBUI_HISTORY_LOGIN_HANDLER_H_ 41 #endif // CHROME_BROWSER_UI_WEBUI_HISTORY_LOGIN_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698