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

Unified Diff: ash/system/tray/tray_item_view.cc

Issue 2807693002: Make LogoutButtonTray a regular View (Closed)
Patch Set: Rebased Created 3 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_container.cc ('k') | ash/system/user/tray_user.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/tray/tray_item_view.cc
diff --git a/ash/system/tray/tray_item_view.cc b/ash/system/tray/tray_item_view.cc
index f04eb59d768866359e5546eca33c517290ea7794..1a5845e4408021463958ea30d69788f9aeaa048a 100644
--- a/ash/system/tray/tray_item_view.cc
+++ b/ash/system/tray/tray_item_view.cc
@@ -5,7 +5,7 @@
#include "ash/system/tray/tray_item_view.h"
#include "ash/public/cpp/shelf_types.h"
-#include "ash/shelf/wm_shelf_util.h"
+#include "ash/shelf/wm_shelf.h"
#include "ash/system/tray/system_tray.h"
#include "ash/system/tray/system_tray_item.h"
#include "ash/system/tray/tray_constants.h"
@@ -90,7 +90,7 @@ gfx::Size TrayItemView::GetPreferredSize() const {
gfx::Size size = rect.size();
if (!animation_.get() || !animation_->is_animating())
return size;
- if (IsHorizontalAlignment(owner()->system_tray()->shelf_alignment())) {
+ if (owner()->system_tray()->shelf()->IsHorizontalAlignment()) {
size.set_width(std::max(
1, static_cast<int>(size.width() * animation_->GetCurrentValue())));
} else {
@@ -110,7 +110,7 @@ void TrayItemView::ChildPreferredSizeChanged(views::View* child) {
void TrayItemView::AnimationProgressed(const gfx::Animation* animation) {
gfx::Transform transform;
- if (IsHorizontalAlignment(owner()->system_tray()->shelf_alignment())) {
+ if (owner()->system_tray()->shelf()->IsHorizontalAlignment()) {
transform.Translate(0, animation->CurrentValueBetween(
static_cast<double>(height()) / 2, 0.));
} else {
« no previous file with comments | « ash/system/tray/tray_container.cc ('k') | ash/system/user/tray_user.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698