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

Unified Diff: chrome/browser/ui/webui/options/manage_profile_handler.h

Issue 7400032: Multi-profile WebUI settings (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: profiles_icon_list.js -> profiles_icon_grid.js Created 9 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/options/manage_profile_handler.h
diff --git a/chrome/browser/ui/webui/options/manage_profile_handler.h b/chrome/browser/ui/webui/options/manage_profile_handler.h
new file mode 100644
index 0000000000000000000000000000000000000000..4960fd57ded2f631e3346a0801e8d8b9ac45af94
--- /dev/null
+++ b/chrome/browser/ui/webui/options/manage_profile_handler.h
@@ -0,0 +1,59 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_MANAGE_PROFILE_HANDLER_H_
+#define CHROME_BROWSER_UI_WEBUI_OPTIONS_MANAGE_PROFILE_HANDLER_H_
+#pragma once
+
+#include "chrome/browser/ui/webui/options/options_ui.h"
+
+// Chrome personal stuff profiles manage overlay UI handler.
+class ManageProfileHandler : public OptionsPageUIHandler {
+ public:
+ ManageProfileHandler();
+ virtual ~ManageProfileHandler();
+
+ // OptionsPageUIHandler:
+ virtual void GetLocalizedValues(base::DictionaryValue* localized_strings);
+ virtual void Initialize();
+
+ // WebUIMessageHandler:
+ virtual void RegisterMessages();
+
+ // NotificationObserver:
+ virtual void Observe(int type,
+ const NotificationSource& source,
+ const NotificationDetails& details);
+
+ private:
+ // Send the array of default profile icon URLs to WebUI.
+ void InitializeDefaultProfileIcons();
+
+ // Sends an object to WebUI of the form:
+ // profileNames = {
+ // "Profile Name 1": true,
+ // "Profile Name 2": true,
+ // ...
+ // };
+ // This is used to detect duplicate profile names.
+ void SendProfileNames();
+
+ // Callback for the "setProfileNameAndIcon" message. Sets the name and icon
+ // of a given profile.
+ // |args| is of the form: [
+ // /*string*/ profileFilePath,
+ // /*string*/ newProfileName,
+ // /*string*/ newProfileIconURL
+ // ]
+ void SetProfileNameAndIcon(const base::ListValue* args);
+
+ // Callback for the "deleteProfile" message. Deletes the given profile.
+ // |args| is of the form: [ {string} profileFilePath ]
+ void DeleteProfile(const base::ListValue* args);
+
+ DISALLOW_COPY_AND_ASSIGN(ManageProfileHandler);
+};
+
+#endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_MANAGE_PROFILE_HANDLER_H_
+
« no previous file with comments | « chrome/browser/resources/options/profiles_icon_grid.js ('k') | chrome/browser/ui/webui/options/manage_profile_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698