Index: chrome/browser/ui/webui/options/manage_profile_handler.h |
=================================================================== |
--- chrome/browser/ui/webui/options/manage_profile_handler.h (revision 175855) |
+++ chrome/browser/ui/webui/options/manage_profile_handler.h (working copy) |
@@ -5,6 +5,9 @@ |
#ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_MANAGE_PROFILE_HANDLER_H_ |
#define CHROME_BROWSER_UI_WEBUI_OPTIONS_MANAGE_PROFILE_HANDLER_H_ |
+#include <string> |
+ |
+#include "base/memory/weak_ptr.h" |
#include "chrome/browser/ui/webui/options/options_ui.h" |
namespace base { |
@@ -44,6 +47,11 @@ |
// { "name": profileName, "iconURL": iconURL } |
void RequestNewProfileDefaults(const base::ListValue* args); |
+ // Send all profile icons to the overlay. |
+ // |iconGrid| is the name of the grid to populate with icons (i.e. |
+ // "create-profile-icon-grid" or "manage-profile-icon-grid"). |
+ void SendProfileIcons(const base::StringValue& icon_grid); |
+ |
// Sends an object to WebUI of the form: |
// profileNames = { |
// "Profile Name 1": true, |
@@ -70,14 +78,22 @@ |
// name in the manager profile dialog based on the selected icon. |
void ProfileIconSelectionChanged(const base::ListValue* args); |
- // Send all profile icons to the overlay. |
- // |iconGrid| is the string representation of which grid the icons will |
- // populate (i.e. "create-profile-icon-grid" or "manage-profile-icon-grid"). |
- void SendProfileIcons(const base::StringValue& icon_grid); |
+ // Callback for the "requestHasProfileShortcuts" message, which is called |
+ // when editing an existing profile. Asks the profile shortcut manager whether |
+ // the profile has shortcuts and gets the result in |OnHasProfileShortcuts()|. |
+ // |args| is of the form: [ {string} profileFilePath ] |
+ void RequestHasProfileShortcuts(const base::ListValue* args); |
+ // Callback invoked from the profile manager indicating whether the profile |
+ // being edited has any desktop shortcuts. |
+ void OnHasProfileShortcuts(bool has_shortcuts); |
+ |
// URL for the current profile's GAIA picture. |
std::string gaia_picture_url_; |
+ // For generating weak pointers to itself for callbacks. |
+ base::WeakPtrFactory<ManageProfileHandler> weak_factory_; |
+ |
DISALLOW_COPY_AND_ASSIGN(ManageProfileHandler); |
}; |