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

Unified Diff: ui/base/models/avatar_menu_item_model.h

Issue 20656002: Add profile selector menu to app list. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rework Created 7 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: ui/base/models/avatar_menu_item_model.h
diff --git a/ui/base/models/avatar_menu_item_model.h b/ui/base/models/avatar_menu_item_model.h
new file mode 100755
index 0000000000000000000000000000000000000000..ab2a79beafd812aa9275df4c4818fc4b3192cbd0
--- /dev/null
+++ b/ui/base/models/avatar_menu_item_model.h
@@ -0,0 +1,44 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
tapted 2013/07/29 01:59:10 nit: Year can be 2013 (and no "(c)" )
calamity 2013/07/30 08:42:34 Done.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_BASE_AVATAR_MENU_ITEM_MODEL_H_
+#define UI_BASE_AVATAR_MENU_ITEM_MODEL_H_
koz (OOO until 15th September) 2013/07/29 00:34:34 should be UI_BASE_MODELS_AVATAR_MENU_ITEM_MODEL_H_
calamity 2013/07/30 08:42:34 Done.
+
+#include "base/basictypes.h"
+#include "ui/gfx/image/image.h"
+
+// Represents an item in the AvatarMenuModel.
+struct AvatarMenuItemModel {
tapted 2013/07/29 01:59:10 This guy should go in namespace ui - that seems to
calamity 2013/07/30 08:42:34 Done.
+AvatarMenuItemModel(size_t model_index, const gfx::Image& icon)
koz (OOO until 15th September) 2013/07/29 00:34:34 This all needs to be indented two spaces.
calamity 2013/07/30 08:42:34 Done.
+ : icon(icon),
+ active(false),
+ signed_in(false),
+ signin_required(false),
+ model_index(model_index) {}
+~AvatarMenuItemModel() {}
tapted 2013/07/29 01:59:10 I think clang will warn at you for having a non-tr
calamity 2013/07/30 08:42:34 Done.
+
+// The icon to be displayed next to the item.
+gfx::Image icon;
+
+// Whether or not the current browser is using this profile.
+bool active;
+
+// The name of this profile.
+string16 name;
tapted 2013/07/29 01:59:10 nit: #include "base/strings/string16.h" for string
calamity 2013/07/30 08:42:34 Done.
+
+// A string representing the sync state of the profile.
+string16 sync_state;
+
+// Whether or not the current profile is signed in. If true, |sync_state| is
+// expected to be the email of the signed in user.
+bool signed_in;
+
+// Whether or not the current profile requires sign-in before use.
+bool signin_required;
+
+// The index in the |profile_cache| that this Item represents.
+size_t model_index;
+};
+
+#endif // UI_BASE_AVATAR_MENU_ITEM_MODEL_H_

Powered by Google App Engine
This is Rietveld 408576698