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

Unified Diff: chrome/browser/ui/webui/history_login_handler.h

Issue 1143963002: Split NTPLoginHandler across chrome://apps and chrome://history. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: lower Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/history_login_handler.h
diff --git a/chrome/browser/ui/webui/history_login_handler.h b/chrome/browser/ui/webui/history_login_handler.h
new file mode 100644
index 0000000000000000000000000000000000000000..790955e81897529baadbce5eb06f55d1714c3ce6
--- /dev/null
+++ b/chrome/browser/ui/webui/history_login_handler.h
@@ -0,0 +1,37 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_UI_WEBUI_HISTORY_LOGIN_HANDLER_H_
+#define CHROME_BROWSER_UI_WEBUI_HISTORY_LOGIN_HANDLER_H_
+
+#include "base/macros.h"
+#include "base/memory/scoped_ptr.h"
+#include "content/public/browser/web_ui_message_handler.h"
+
+class ProfileInfoWatcher;
+
+// The handler for login-related messages from chrome://history.
+class HistoryLoginHandler : public content::WebUIMessageHandler {
+ public:
+ HistoryLoginHandler();
+ ~HistoryLoginHandler() override;
+
+ // WebUIMessageHandler implementation.
+ void RegisterMessages() override;
+
+ private:
+ // Handler for the "otherDevicesInitialized" message. No args.
+ void HandleOtherDevicesInitialized(const base::ListValue* args);
+
+ // Called by |profile_info_watcher_| on desktop if profile info changes.
+ void ProfileInfoChanged();
+
+ // Watches this web UI's profile for info changes (e.g. authenticated username
+ // changes).
+ scoped_ptr<ProfileInfoWatcher> profile_info_watcher_;
+
+ DISALLOW_COPY_AND_ASSIGN(HistoryLoginHandler);
+};
+
+#endif // CHROME_BROWSER_UI_WEBUI_HISTORY_LOGIN_HANDLER_H_

Powered by Google App Engine
This is Rietveld 408576698