1 // Copyright 2014 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.
5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_SUPERVISED_USER_CREATE_CONFIRM_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_SUPERVISED_USER_CREATE_CONFIRM_HANDLER_H_
8 #include "chrome/browser/ui/webui/options/options_ui.h"
11 class DictionaryValue
;
16 // Handler for the confirmation dialog after successful creation of a supervised
18 class SupervisedUserCreateConfirmHandler
: public OptionsPageUIHandler
{
20 SupervisedUserCreateConfirmHandler();
21 ~SupervisedUserCreateConfirmHandler() override
;
23 // OptionsPageUIHandler implementation.
24 void GetLocalizedValues(base::DictionaryValue
* localized_strings
) override
;
26 // WebUIMessageHandler implementation.
27 void RegisterMessages() override
;
30 // An observer for any changes to Profiles in the ProfileInfoCache so that
31 // this dialog can be updated or closed.
32 class ProfileUpdateObserver
;
34 // Callback for the "switchToProfile" message.
35 // Opens a new window for the profile.
36 // |args| is of the form [ {string} profileFilePath ]
37 void SwitchToProfile(const base::ListValue
* args
);
39 // Observes the ProfileInfoCache and gets notified when a profile has been
40 // modified, so that the dialog can be updated or closed.
41 scoped_ptr
<ProfileUpdateObserver
> profile_info_cache_observer_
;
43 DISALLOW_COPY_AND_ASSIGN(SupervisedUserCreateConfirmHandler
);
46 } // namespace options
48 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_SUPERVISED_USER_CREATE_CONFIRM_HANDLER_H_