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

Side by Side Diff: chrome/browser/ui/webui/options2/manage_profile_handler.h

Issue 10837331: Options: s/options2/options/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: wut Created 8 years, 4 months 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 | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS2_MANAGE_PROFILE_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS2_MANAGE_PROFILE_HANDLER_H_
7
8 #include "chrome/browser/ui/webui/options2/options_ui.h"
9
10 namespace base {
11 class StringValue;
12 }
13
14 namespace options {
15
16 // Chrome personal stuff profiles manage overlay UI handler.
17 class ManageProfileHandler : public OptionsPageUIHandler {
18 public:
19 ManageProfileHandler();
20 virtual ~ManageProfileHandler();
21
22 // OptionsPageUIHandler:
23 virtual void GetLocalizedValues(
24 base::DictionaryValue* localized_strings) OVERRIDE;
25 virtual void InitializeHandler() OVERRIDE;
26 virtual void InitializePage() OVERRIDE;
27
28 // WebUIMessageHandler:
29 virtual void RegisterMessages() OVERRIDE;
30
31 // content::NotificationObserver:
32 virtual void Observe(int type,
33 const content::NotificationSource& source,
34 const content::NotificationDetails& details) OVERRIDE;
35
36 private:
37 // Callback for the "requestDefaultProfileIcons" message.
38 // Sends the array of default profile icon URLs to WebUI.
39 // |args| is of the form: [ {string} iconURL ]
40 void RequestDefaultProfileIcons(const base::ListValue* args);
41
42 // Sends an object to WebUI of the form:
43 // profileNames = {
44 // "Profile Name 1": true,
45 // "Profile Name 2": true,
46 // ...
47 // };
48 // This is used to detect duplicate profile names.
49 void SendProfileNames();
50
51 // Callback for the "setProfileNameAndIcon" message. Sets the name and icon
52 // of a given profile.
53 // |args| is of the form: [
54 // /*string*/ profileFilePath,
55 // /*string*/ newProfileName,
56 // /*string*/ newProfileIconURL
57 // ]
58 void SetProfileNameAndIcon(const base::ListValue* args);
59
60 // Callback for the "deleteProfile" message. Deletes the given profile.
61 // |args| is of the form: [ {string} profileFilePath ]
62 void DeleteProfile(const base::ListValue* args);
63
64 // Callback for the 'profileIconSelectionChanged' message. Used to update the
65 // name in the manager profile dialog based on the selected icon.
66 void ProfileIconSelectionChanged(const base::ListValue* args);
67
68 // Send all profile icons to the overlay.
69 // |iconGrid| is the string representation of which grid the icons will
70 // populate (i.e. "create-profile-icon-grid" or "manage-profile-icon-grid").
71 void SendProfileIcons(const base::StringValue& icon_grid);
72
73 // URL for the current profile's GAIA picture.
74 std::string gaia_picture_url_;
75
76 DISALLOW_COPY_AND_ASSIGN(ManageProfileHandler);
77 };
78
79 } // namespace options
80
81 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS2_MANAGE_PROFILE_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698