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

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

Issue 8135009: [Multi profile] Clicking "Customize User" should show the "Manage User" dialog. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: " Created 9 years, 2 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
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #pragma once 7 #pragma once
8 8
9 #include "chrome/browser/ui/webui/options/options_ui.h" 9 #include "chrome/browser/ui/webui/options/options_ui.h"
10 10
11 // Chrome personal stuff profiles manage overlay UI handler. 11 // Chrome personal stuff profiles manage overlay UI handler.
12 class ManageProfileHandler : public OptionsPageUIHandler { 12 class ManageProfileHandler : public OptionsPageUIHandler {
13 public: 13 public:
14 ManageProfileHandler(); 14 ManageProfileHandler();
15 virtual ~ManageProfileHandler(); 15 virtual ~ManageProfileHandler();
16 16
17 // OptionsPageUIHandler: 17 // OptionsPageUIHandler:
18 virtual void GetLocalizedValues(base::DictionaryValue* localized_strings); 18 virtual void GetLocalizedValues(base::DictionaryValue* localized_strings);
19 virtual void Initialize(); 19 virtual void Initialize();
20 20
21 // WebUIMessageHandler: 21 // WebUIMessageHandler:
22 virtual void RegisterMessages(); 22 virtual void RegisterMessages();
23 23
24 // NotificationObserver: 24 // NotificationObserver:
25 virtual void Observe(int type, 25 virtual void Observe(int type,
26 const NotificationSource& source, 26 const NotificationSource& source,
27 const NotificationDetails& details); 27 const NotificationDetails& details);
28 28
29 private: 29 private:
30 // Callback for the "requestDefaultProfileIcons" message.
30 // Send the array of default profile icon URLs to WebUI. 31 // Send the array of default profile icon URLs to WebUI.
James Hawkins 2011/10/04 20:33:42 s/Send/Sends/ Document |args|.
binji 2011/10/04 21:39:56 Done.
31 void InitializeDefaultProfileIcons(); 32 void RequestDefaultProfileIcons(const base::ListValue* args);
32 33
33 // Sends an object to WebUI of the form: 34 // Sends an object to WebUI of the form:
34 // profileNames = { 35 // profileNames = {
35 // "Profile Name 1": true, 36 // "Profile Name 1": true,
36 // "Profile Name 2": true, 37 // "Profile Name 2": true,
37 // ... 38 // ...
38 // }; 39 // };
39 // This is used to detect duplicate profile names. 40 // This is used to detect duplicate profile names.
40 void SendProfileNames(); 41 void SendProfileNames();
41 42
42 // Callback for the "setProfileNameAndIcon" message. Sets the name and icon 43 // Callback for the "setProfileNameAndIcon" message. Sets the name and icon
43 // of a given profile. 44 // of a given profile.
44 // |args| is of the form: [ 45 // |args| is of the form: [
45 // /*string*/ profileFilePath, 46 // /*string*/ profileFilePath,
46 // /*string*/ newProfileName, 47 // /*string*/ newProfileName,
47 // /*string*/ newProfileIconURL 48 // /*string*/ newProfileIconURL
48 // ] 49 // ]
49 void SetProfileNameAndIcon(const base::ListValue* args); 50 void SetProfileNameAndIcon(const base::ListValue* args);
50 51
51 // Callback for the "deleteProfile" message. Deletes the given profile. 52 // Callback for the "deleteProfile" message. Deletes the given profile.
52 // |args| is of the form: [ {string} profileFilePath ] 53 // |args| is of the form: [ {string} profileFilePath ]
53 void DeleteProfile(const base::ListValue* args); 54 void DeleteProfile(const base::ListValue* args);
54 55
56 // Callback for the "requestProfileInfo" message.
57 // Given |args| of the form: [ {number} profileIndex ]
58 // Sends an object to WebUI of the form:
59 // profileInfo = {
60 // name: "Profile Name",
61 // iconURL: "chrome://path/to/icon/image",
62 // filePath: "/path/to/profile/data/on/disk"
63 // isCurrentProfile: false,
64 // };
65 void RequestProfileInfo(const base::ListValue* args);
66
55 DISALLOW_COPY_AND_ASSIGN(ManageProfileHandler); 67 DISALLOW_COPY_AND_ASSIGN(ManageProfileHandler);
56 }; 68 };
57 69
58 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_MANAGE_PROFILE_HANDLER_H_ 70 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_MANAGE_PROFILE_HANDLER_H_
59
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698