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

Unified Diff: ash/common/system/status_area_widget.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: merge 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
Index: ash/common/system/status_area_widget.h
diff --git a/ash/common/system/status_area_widget.h b/ash/common/system/status_area_widget.h
index 562949612f0d98903f2ac0f73c4e0a6495a4c91b..e2896bb0634c661f0f85c43b712f91229ecf928e 100644
--- a/ash/common/system/status_area_widget.h
+++ b/ash/common/system/status_area_widget.h
@@ -9,6 +9,7 @@
#include "ash/common/login_status.h"
#include "ash/common/shelf/shelf_background_animator_observer.h"
#include "ash/common/shelf/shelf_types.h"
+#include "ash/common/shelf/wm_shelf_observer.h"
#include "base/macros.h"
#include "ui/views/widget/widget.h"
@@ -17,6 +18,7 @@ class OverviewButtonTray;
class ShellDelegate;
class StatusAreaWidgetDelegate;
class SystemTray;
+class TrayBackgroundView;
class WebNotificationTray;
class WmShelf;
class WmWindow;
@@ -28,7 +30,8 @@ class VirtualKeyboardTray;
#endif
class ASH_EXPORT StatusAreaWidget : public views::Widget,
- public ShelfBackgroundAnimatorObserver {
+ public ShelfBackgroundAnimatorObserver,
+ public WmShelfObserver {
public:
StatusAreaWidget(WmWindow* status_container, WmShelf* wm_shelf);
~StatusAreaWidget() override;
@@ -85,6 +88,12 @@ class ASH_EXPORT StatusAreaWidget : public views::Widget,
// ShelfBackgroundAnimatorObserver:
void UpdateShelfItemBackground(int alpha) override;
+ // Based on visibility of |tray| and tray item on its right, it sets |tray|'s
varkha 2016/08/10 23:27:24 nit: remove "it" (in "it sets |tray|'s ...").
yiyix 2016/08/11 01:23:18 Done.
+ // visibility of the separator either to true or false. Note that no leading
+ // separator is required before the |logout_button_tray_| because that
+ // button's red background is distinctive on its own.
+ void OnVisibilityChange(TrayBackgroundView* tray) override;
James Cook 2016/08/09 00:25:17 nit: put "WmShelfObserver:" above this line and mo
yiyix 2016/08/11 01:23:19 Done.
+
private:
void AddSystemTray();
void AddWebNotificationTray();

Powered by Google App Engine
This is Rietveld 408576698