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

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

Issue 2147143002: [Chrome OS MD] Draw a 1px separator between 2 tray items (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address nits Created 4 years, 4 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/common/system/status_area_widget.cc ('k') | ash/common/system/tray/tray_background_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 741417400d92b36e94da1bf267be46326569fde2..fc38217098c7f02d724500cff2a746746302b1fe 100644
--- a/ash/common/system/tray/tray_background_view.h
+++ b/ash/common/system/tray/tray_background_view.h
@@ -24,7 +24,7 @@ class WmShelf;
// Base class for children of StatusAreaWidget: SystemTray, WebNotificationTray,
// LogoutButtonTray, OverviewButtonTray.
// This class handles setting and animating the background when the Launcher
-// his shown/hidden. It also inherits from ActionableView so that the tray
+// is shown/hidden. It also inherits from ActionableView so that the tray
// items can override PerformAction when clicked on.
class ASH_EXPORT TrayBackgroundView : public ActionableView,
public ui::ImplicitAnimationObserver,
@@ -80,6 +80,7 @@ class ASH_EXPORT TrayBackgroundView : public ActionableView,
void ChildPreferredSizeChanged(views::View* child) override;
void GetAccessibleState(ui::AXViewState* state) override;
void AboutToRequestFocusFromTabTraversal(bool reverse) override;
+ void OnPaint(gfx::Canvas* canvas) override;
// ActionableView:
bool PerformAction(const ui::Event& event) override;
@@ -138,13 +139,12 @@ class ASH_EXPORT TrayBackgroundView : public ActionableView,
// ShelfBackgroundAnimatorObserver:
void UpdateShelfItemBackground(int alpha) override;
+ // Updates the visibility of this tray's separator.
+ void SetSeparatorVisibility(bool is_show);
+
private:
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();
-
// ui::ImplicitAnimationObserver:
void OnImplicitAnimationsCompleted() override;
bool RequiresNotificationWhenAnimatorDestroyed() const override;
@@ -170,6 +170,10 @@ class ASH_EXPORT TrayBackgroundView : public ActionableView,
// differently if set to true.
bool draw_background_as_active_;
+ // Visibility of this tray's separator which is a line of 1x32px and 4px to
+ // right of tray.
+ bool is_separator_visible_;
+
std::unique_ptr<TrayWidgetObserver> widget_observer_;
std::unique_ptr<TrayEventFilter> tray_event_filter_;
« no previous file with comments | « ash/common/system/status_area_widget.cc ('k') | ash/common/system/tray/tray_background_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698