- add sources.
[platform/framework/web/crosswalk.git] / src / chrome / browser / ui / webui / signin / user_manager_screen_handler.h
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_UI_WEBUI_SIGNIN_USER_MANAGER_SCREEN_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_SIGNIN_USER_MANAGER_SCREEN_HANDLER_H_
7
8 #include "base/compiler_specific.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "chrome/browser/ui/host_desktop.h"
11 #include "content/public/browser/web_ui_message_handler.h"
12
13 namespace base {
14 class DictionaryValue;
15 class FilePath;
16 class ListValue;
17 }
18
19 class UserManagerScreenHandler : public content::WebUIMessageHandler {
20  public:
21   UserManagerScreenHandler();
22   virtual ~UserManagerScreenHandler();
23
24   // WebUIMessageHandler implementation.
25   virtual void RegisterMessages() OVERRIDE;
26
27   void GetLocalizedValues(base::DictionaryValue* localized_strings);
28
29  private:
30   // An observer for any changes to Profiles in the ProfileInfoCache so that
31   // all the visible user manager screens can be updated.
32   class ProfileUpdateObserver;
33
34   void HandleInitialize(const base::ListValue* args);
35   void HandleAddUser(const base::ListValue* args);
36   void HandleLaunchGuest(const base::ListValue* args);
37   void HandleLaunchUser(const base::ListValue* args);
38   void HandleRemoveUser(const base::ListValue* args);
39
40   // Sends user list to account chooser.
41   void SendUserList();
42
43   // Observes the ProfileInfoCache and gets notified when a profile has been
44   // modified, so that the displayed user pods can be updated.
45   scoped_ptr<ProfileUpdateObserver> profileInfoCacheObserver_;
46
47   // The host desktop type this user manager belongs to.
48   chrome::HostDesktopType desktop_type_;
49
50   DISALLOW_COPY_AND_ASSIGN(UserManagerScreenHandler);
51 };
52
53 #endif  // CHROME_BROWSER_UI_WEBUI_SIGNIN_USER_MANAGER_SCREEN_HANDLER_H_