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

Unified Diff: ash/system/user/accounts_detailed_view.h

Issue 210903003: Implemented system tray UI for new account management. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge conflicts resolved. Created 6 years, 8 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
« no previous file with comments | « ash/system/tray/tray_details_view.cc ('k') | ash/system/user/accounts_detailed_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/user/accounts_detailed_view.h
diff --git a/ash/system/user/accounts_detailed_view.h b/ash/system/user/accounts_detailed_view.h
new file mode 100644
index 0000000000000000000000000000000000000000..6dd9a0bbe7239358d21ce4278039d2a1cd1d273b
--- /dev/null
+++ b/ash/system/user/accounts_detailed_view.h
@@ -0,0 +1,70 @@
+// Copyright 2014 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 ASH_SYSTEM_USER_ACCOUNTS_DETAILED_VIEW_H_
+#define ASH_SYSTEM_USER_ACCOUNTS_DETAILED_VIEW_H_
+
+#include <map>
+#include <string>
+
+#include "ash/system/tray/tray_details_view.h"
+#include "ash/system/tray/view_click_listener.h"
+#include "ash/system/user/login_status.h"
+#include "ash/system/user/user_accounts_delegate.h"
+#include "ash/system/user/user_view.h"
+#include "base/macros.h"
+#include "grit/ash_strings.h"
+#include "ui/base/l10n/l10n_util.h"
+#include "ui/views/controls/button/button.h"
+#include "ui/views/controls/label.h"
+
+namespace ash {
+
+class TrayUser;
+
+namespace tray {
+
+// This detailed view appears after a click on the primary user's card when the
+// new account managment is enabled.
+class AccountsDetailedView : public TrayDetailsView,
+ public ViewClickListener,
+ public views::ButtonListener,
+ public ash::tray::UserAccountsDelegate::Observer {
+ public:
+ AccountsDetailedView(TrayUser* owner, user::LoginStatus login_status);
+ virtual ~AccountsDetailedView();
+
+ private:
+ // Overridden from ViewClickListener.
+ virtual void OnViewClicked(views::View* sender) OVERRIDE;
+
+ // Overridden from views::ButtonListener.
+ virtual void ButtonPressed(views::Button* sender,
+ const ui::Event& event) OVERRIDE;
+
+ // Overridden from ash::tray::UserAccountsDelegate::Observer.
+ virtual void AccountListChanged() OVERRIDE;
+
+ void AddHeader(user::LoginStatus login_status);
+ void AddAccountList();
+ void AddAddAccountButton();
+ void AddFooter();
+
+ void UpdateAccountList();
+
+ views::View* CreateDeleteButton();
+
+ ash::tray::UserAccountsDelegate* delegate_;
+ views::View* account_list_;
+ views::View* add_account_button_;
+ views::View* add_user_button_;
+ std::map<views::View*, std::string> delete_button_to_account_id_;
+
+ DISALLOW_COPY_AND_ASSIGN(AccountsDetailedView);
+};
+
+} // namespace tray
+} // namespace ash
+
+#endif // ASH_SYSTEM_USER_ACCOUNTS_DETAILED_VIEW_H_
« no previous file with comments | « ash/system/tray/tray_details_view.cc ('k') | ash/system/user/accounts_detailed_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698