OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_OPTIONS_MANAGE_PROFILE_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_MANAGE_PROFILE_HANDLER_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_MANAGE_PROFILE_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_MANAGE_PROFILE_HANDLER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 void ProfileIconSelectionChanged(const base::ListValue* args); | 93 void ProfileIconSelectionChanged(const base::ListValue* args); |
94 | 94 |
95 // Callback for the "requestHasProfileShortcuts" message, which is called | 95 // Callback for the "requestHasProfileShortcuts" message, which is called |
96 // when editing an existing profile. Asks the profile shortcut manager whether | 96 // when editing an existing profile. Asks the profile shortcut manager whether |
97 // the profile has shortcuts and gets the result in |OnHasProfileShortcuts()|. | 97 // the profile has shortcuts and gets the result in |OnHasProfileShortcuts()|. |
98 // |args| is of the form: [ {string} profileFilePath ] | 98 // |args| is of the form: [ {string} profileFilePath ] |
99 void RequestHasProfileShortcuts(const base::ListValue* args); | 99 void RequestHasProfileShortcuts(const base::ListValue* args); |
100 | 100 |
101 // Callback for the "RequestCreateProfileUpdate" message. | 101 // Callback for the "RequestCreateProfileUpdate" message. |
102 // Sends the email address of the signed-in user, or an empty string if the | 102 // Sends the email address of the signed-in user, or an empty string if the |
103 // user is not signed in. Also sends information about whether managed users | 103 // user is not signed in. Also sends information about whether supervised |
104 // may be created. | 104 // users may be created. |
105 void RequestCreateProfileUpdate(const base::ListValue* args); | 105 void RequestCreateProfileUpdate(const base::ListValue* args); |
106 | 106 |
107 // When the pref allowing managed-user creation changes, sends the new value | 107 // When the pref allowing supervised-user creation changes, sends the new |
108 // to the UI. | 108 // value to the UI. |
109 void OnCreateManagedUserPrefChange(); | 109 void OnCreateSupervisedUserPrefChange(); |
110 | 110 |
111 // Callback invoked from the profile manager indicating whether the profile | 111 // Callback invoked from the profile manager indicating whether the profile |
112 // being edited has any desktop shortcuts. | 112 // being edited has any desktop shortcuts. |
113 void OnHasProfileShortcuts(bool has_shortcuts); | 113 void OnHasProfileShortcuts(bool has_shortcuts); |
114 | 114 |
115 // Callback for the "addProfileShortcut" message, which is called when editing | 115 // Callback for the "addProfileShortcut" message, which is called when editing |
116 // an existing profile and the user clicks the "Add desktop shortcut" button. | 116 // an existing profile and the user clicks the "Add desktop shortcut" button. |
117 // Adds a desktop shortcut for the profile. | 117 // Adds a desktop shortcut for the profile. |
118 void AddProfileShortcut(const base::ListValue* args); | 118 void AddProfileShortcut(const base::ListValue* args); |
119 | 119 |
120 // Callback for the "removeProfileShortcut" message, which is called when | 120 // Callback for the "removeProfileShortcut" message, which is called when |
121 // editing an existing profile and the user clicks the "Remove desktop | 121 // editing an existing profile and the user clicks the "Remove desktop |
122 // shortcut" button. Removes the desktop shortcut for the profile. | 122 // shortcut" button. Removes the desktop shortcut for the profile. |
123 void RemoveProfileShortcut(const base::ListValue* args); | 123 void RemoveProfileShortcut(const base::ListValue* args); |
124 | 124 |
125 // Callback for the "refreshGaiaPicture" message, which is called when the | 125 // Callback for the "refreshGaiaPicture" message, which is called when the |
126 // user is editing an existing profile. | 126 // user is editing an existing profile. |
127 void RefreshGaiaPicture(const base::ListValue* args); | 127 void RefreshGaiaPicture(const base::ListValue* args); |
128 | 128 |
129 // URL for the current profile's GAIA picture. | 129 // URL for the current profile's GAIA picture. |
130 std::string gaia_picture_url_; | 130 std::string gaia_picture_url_; |
131 | 131 |
132 // Used to observe the preference that allows creating managed users, which | 132 // Used to observe the preference that allows creating supervised users, which |
133 // can be changed by policy. | 133 // can be changed by policy. |
134 PrefChangeRegistrar pref_change_registrar_; | 134 PrefChangeRegistrar pref_change_registrar_; |
135 | 135 |
136 // For generating weak pointers to itself for callbacks. | 136 // For generating weak pointers to itself for callbacks. |
137 base::WeakPtrFactory<ManageProfileHandler> weak_factory_; | 137 base::WeakPtrFactory<ManageProfileHandler> weak_factory_; |
138 | 138 |
139 DISALLOW_COPY_AND_ASSIGN(ManageProfileHandler); | 139 DISALLOW_COPY_AND_ASSIGN(ManageProfileHandler); |
140 }; | 140 }; |
141 | 141 |
142 } // namespace options | 142 } // namespace options |
143 | 143 |
144 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_MANAGE_PROFILE_HANDLER_H_ | 144 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_MANAGE_PROFILE_HANDLER_H_ |
OLD | NEW |