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

Side by Side Diff: chrome/browser/ui/webui/ntp/ntp_login_handler.h

Issue 8986007: Move WebUIMessageHandler to its own file in the public directory and put it in the content namesp... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 8 years, 11 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 | Annotate | Revision Log
OLDNEW
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_NTP_NTP_LOGIN_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_NTP_NTP_LOGIN_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_NTP_NTP_LOGIN_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_NTP_NTP_LOGIN_HANDLER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "chrome/browser/prefs/pref_member.h" 9 #include "chrome/browser/prefs/pref_member.h"
10 #include "content/browser/webui/web_ui.h"
11 #include "content/public/browser/notification_observer.h" 10 #include "content/public/browser/notification_observer.h"
12 #include "content/public/browser/notification_registrar.h" 11 #include "content/public/browser/notification_registrar.h"
12 #include "content/public/browser/web_ui_message_handler.h"
13 13
14 class Profile; 14 class Profile;
15 15
16 // The NTP login handler currently simply displays the current logged in 16 // The NTP login handler currently simply displays the current logged in
17 // username at the top of the NTP (and update itself when that changes). 17 // 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. 18 // In the future it may expand to allow users to login from the NTP.
19 class NTPLoginHandler : public WebUIMessageHandler, 19 class NTPLoginHandler : public content::WebUIMessageHandler,
20 public content::NotificationObserver { 20 public content::NotificationObserver {
21 public: 21 public:
22 NTPLoginHandler(); 22 NTPLoginHandler();
23 virtual ~NTPLoginHandler(); 23 virtual ~NTPLoginHandler();
24 24
25 // WebUIMessageHandler interface 25 // WebUIMessageHandler interface
26 virtual void RegisterMessages() OVERRIDE; 26 virtual void RegisterMessages() OVERRIDE;
27 27
28 // content::NotificationObserver interface 28 // content::NotificationObserver interface
29 virtual void Observe(int type, 29 virtual void Observe(int type,
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 void HandleShowAdvancedLoginUI(const ListValue* args); 67 void HandleShowAdvancedLoginUI(const ListValue* args);
68 68
69 // Internal helper method 69 // Internal helper method
70 void UpdateLogin(); 70 void UpdateLogin();
71 71
72 StringPrefMember username_pref_; 72 StringPrefMember username_pref_;
73 content::NotificationRegistrar registrar_; 73 content::NotificationRegistrar registrar_;
74 }; 74 };
75 75
76 #endif // CHROME_BROWSER_UI_WEBUI_NTP_NTP_LOGIN_HANDLER_H_ 76 #endif // CHROME_BROWSER_UI_WEBUI_NTP_NTP_LOGIN_HANDLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/ntp/new_tab_page_sync_handler.cc ('k') | chrome/browser/ui/webui/ntp/ntp_login_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698