Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(369)

Side by Side Diff: chrome/browser/ui/webui/settings/settings_manage_profile_handler.h

Issue 2498153002: [MD Settings][MD User Manager] create/manage profile desktop shortcut (Windows only) (Closed)
Patch Set: Addressed comments Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_SETTINGS_SETTINGS_MANAGE_PROFILE_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_SETTINGS_SETTINGS_MANAGE_PROFILE_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_SETTINGS_SETTINGS_MANAGE_PROFILE_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_SETTINGS_SETTINGS_MANAGE_PROFILE_HANDLER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 // of a given profile. 52 // of a given profile.
53 // |args| is of the form: [ 53 // |args| is of the form: [
54 // /*string*/ newProfileIconURL 54 // /*string*/ newProfileIconURL
55 // /*string*/ newProfileName, 55 // /*string*/ newProfileName,
56 // ] 56 // ]
57 void HandleSetProfileIconAndName(const base::ListValue* args); 57 void HandleSetProfileIconAndName(const base::ListValue* args);
58 58
59 // Callback for the "requestHasProfileShortcuts" message, which is called 59 // Callback for the "requestHasProfileShortcuts" message, which is called
60 // when editing an existing profile. Asks the profile shortcut manager whether 60 // when editing an existing profile. Asks the profile shortcut manager whether
61 // the profile has shortcuts and gets the result in |OnHasProfileShortcuts()|. 61 // the profile has shortcuts and gets the result in |OnHasProfileShortcuts()|.
62 // |args| is of the form: [ {string} profileFilePath ]
63 void HandleRequestHasProfileShortcuts(const base::ListValue* args); 62 void HandleRequestHasProfileShortcuts(const base::ListValue* args);
64 63
65 // Callback invoked from the profile manager indicating whether the profile 64 // Callback invoked from the profile manager indicating whether the profile
66 // being edited has any desktop shortcuts. 65 // being edited has any desktop shortcuts.
67 void OnHasProfileShortcuts(bool has_shortcuts); 66 void OnHasProfileShortcuts(const base::Value* callback_id,
67 bool has_shortcuts);
68 68
69 // Callback for the "addProfileShortcut" message, which is called when editing 69 // Callback for the "addProfileShortcut" message, which is called when editing
70 // an existing profile and the user clicks the "Add desktop shortcut" button. 70 // an existing profile and the user clicks the "Add desktop shortcut" button.
71 // Adds a desktop shortcut for the profile. 71 // Adds a desktop shortcut for the profile.
72 void HandleAddProfileShortcut(const base::ListValue* args); 72 void HandleAddProfileShortcut(const base::ListValue* args);
73 73
74 // Callback for the "removeProfileShortcut" message, which is called when 74 // Callback for the "removeProfileShortcut" message, which is called when
75 // editing an existing profile and the user clicks the "Remove desktop 75 // editing an existing profile and the user clicks the "Remove desktop
76 // shortcut" button. Removes the desktop shortcut for the profile. 76 // shortcut" button. Removes the desktop shortcut for the profile.
77 void HandleRemoveProfileShortcut(const base::ListValue* args); 77 void HandleRemoveProfileShortcut(const base::ListValue* args);
78 78
79 // Non-owning pointer to the associated profile. 79 // Non-owning pointer to the associated profile.
80 Profile* profile_; 80 Profile* profile_;
81 81
82 // URL for the current profile's GAIA picture. 82 // URL for the current profile's GAIA picture.
83 std::string gaia_picture_url_; 83 std::string gaia_picture_url_;
84 84
85 // Used to observe profile avatar updates. 85 // Used to observe profile avatar updates.
86 ScopedObserver<ProfileAttributesStorage, ManageProfileHandler> observer_; 86 ScopedObserver<ProfileAttributesStorage, ManageProfileHandler> observer_;
87 87
88 // For generating weak pointers to itself for callbacks. 88 // For generating weak pointers to itself for callbacks.
89 base::WeakPtrFactory<ManageProfileHandler> weak_factory_; 89 base::WeakPtrFactory<ManageProfileHandler> weak_factory_;
90 90
91 DISALLOW_COPY_AND_ASSIGN(ManageProfileHandler); 91 DISALLOW_COPY_AND_ASSIGN(ManageProfileHandler);
92 }; 92 };
93 93
94 } // namespace settings 94 } // namespace settings
95 95
96 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_SETTINGS_MANAGE_PROFILE_HANDLER_H_ 96 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_SETTINGS_MANAGE_PROFILE_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698