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 "content/public/browser/web_ui_message_handler.h" 11 12 namespace base { 13 class DictionaryValue; 14 class FilePath; 15 class ListValue; 16 } 17 18 class UserManagerScreenHandler : public content::WebUIMessageHandler { 19 public: 20 UserManagerScreenHandler(); 21 virtual ~UserManagerScreenHandler(); 22 23 // WebUIMessageHandler implementation. 24 virtual void RegisterMessages() OVERRIDE; 25 26 void GetLocalizedValues(base::DictionaryValue* localized_strings); 27 28 private: 29 // An observer for any changes to Profiles in the ProfileInfoCache so that 30 // all the visible user manager screens can be updated. 31 class ProfileUpdateObserver; 32 33 void HandleInitialize(const base::ListValue* args); 34 void HandleAddUser(const base::ListValue* args); 35 void HandleLaunchGuest(const base::ListValue* args); 36 void HandleLaunchUser(const base::ListValue* args); 37 void HandleRemoveUser(const base::ListValue* args); 38 39 // Sends user list to account chooser. 40 void SendUserList(); 41 42 // Observes the ProfileInfoCache and gets notified when a profile has been 43 // modified, so that the displayed user pods can be updated. 44 scoped_ptr<ProfileUpdateObserver> profileInfoCacheObserver_; 45 46 DISALLOW_COPY_AND_ASSIGN(UserManagerScreenHandler); 47 }; 48 49 #endif // CHROME_BROWSER_UI_WEBUI_SIGNIN_USER_MANAGER_SCREEN_HANDLER_H_ 50