blob: a2593fd129a706dc7273b81d19e85822bf176ae4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
// Copyright 2014 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_OPTIONS_SUPERVISED_USER_CREATE_CONFIRM_HANDLER_H_
#define CHROME_BROWSER_UI_WEBUI_OPTIONS_SUPERVISED_USER_CREATE_CONFIRM_HANDLER_H_
#include "base/macros.h"
#include "chrome/browser/ui/webui/options/options_ui.h"
namespace base {
class DictionaryValue;
}
namespace options {
// Handler for the confirmation dialog after successful creation of a supervised
// user.
class SupervisedUserCreateConfirmHandler : public OptionsPageUIHandler {
public:
SupervisedUserCreateConfirmHandler();
~SupervisedUserCreateConfirmHandler() override;
// OptionsPageUIHandler implementation.
void GetLocalizedValues(base::DictionaryValue* localized_strings) override;
// WebUIMessageHandler implementation.
void RegisterMessages() override;
private:
// An observer for any changes to Profiles in the ProfileAttributesStorage so
// that this dialog can be updated or closed.
class ProfileUpdateObserver;
// Callback for the "switchToProfile" message.
// Opens a new window for the profile.
// |args| is of the form [ {string} profileFilePath ]
void SwitchToProfile(const base::ListValue* args);
// Observes the ProfileAttributesStorage and gets notified when a profile has
// been modified, so that the dialog can be updated or closed.
scoped_ptr<ProfileUpdateObserver> profile_update_observer_;
DISALLOW_COPY_AND_ASSIGN(SupervisedUserCreateConfirmHandler);
};
} // namespace options
#endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_SUPERVISED_USER_CREATE_CONFIRM_HANDLER_H_
|