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

Unified Diff: ash/common/system/tray/tray_background_view.h

Issue 2103113003: Fix shelf layout when switching from left-aligned shelf to right-aligned shelf (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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: ash/common/system/tray/tray_background_view.h
diff --git a/ash/common/system/tray/tray_background_view.h b/ash/common/system/tray/tray_background_view.h
index 478e427bda77e0b79719747d9decd52ee0a0e6a2..316fb7fc15ffacd2623d46159610ab585828c348 100644
--- a/ash/common/system/tray/tray_background_view.h
+++ b/ash/common/system/tray/tray_background_view.h
@@ -15,6 +15,10 @@
#include "ui/compositor/layer_animation_observer.h"
#include "ui/views/bubble/tray_bubble_view.h"
+namespace gfx {
+class Insets;
+}
+
namespace ash {
class ShelfLayoutManager;
class TrayEventFilter;
@@ -66,7 +70,7 @@ class ASH_EXPORT TrayBackgroundView : public ActionableView,
~TrayBackgroundView() override;
// Called after the tray has been added to the widget containing it.
tdanderson 2016/06/29 17:46:19 Please add to this comment to explain what |insets
yiyix 2016/06/29 18:56:39 Done.
- virtual void Initialize();
+ virtual void Initialize(const gfx::Insets& insets);
// Initializes animations for the bubble.
static void InitializeBubbleAnimations(views::Widget* bubble_widget);
@@ -87,7 +91,8 @@ class ASH_EXPORT TrayBackgroundView : public ActionableView,
void UpdateBackground(int alpha) override;
// Called whenever the shelf alignment changes.
tdanderson 2016/06/29 17:46:19 Please add to this comment to explain |insets|
yiyix 2016/06/29 18:56:39 Done.
- virtual void SetShelfAlignment(ShelfAlignment alignment);
+ virtual void SetShelfAlignment(ShelfAlignment alignment,
+ const gfx::Insets& insets);
// Called when the anchor (tray or bubble) may have moved or changed.
virtual void AnchorUpdated() {}
@@ -139,8 +144,8 @@ class ASH_EXPORT TrayBackgroundView : public ActionableView,
class TrayWidgetObserver;
// Called from Initialize after all status area trays have been created.
- // Sets the border based on the position of the view.
- void SetTrayBorder();
+ // Sets the border based on given |insets|.
+ void SetTrayBorder(const gfx::Insets& insets);
// ui::ImplicitAnimationObserver:
void OnImplicitAnimationsCompleted() override;

Powered by Google App Engine
This is Rietveld 408576698