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

Side by Side Diff: ash/system/tray/tray_container.h

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 unified diff | Download patch
« no previous file with comments | « ash/system/tray/tray_background_view.cc ('k') | ash/system/tray/tray_container.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef ASH_SYSTEM_TRAY_TRAY_CONTAINER_H_
6 #define ASH_SYSTEM_TRAY_TRAY_CONTAINER_H_
7
8 #include "base/macros.h"
9 #include "ui/views/view.h"
10
11 namespace ash {
12 class WmShelf;
13
14 // Base class for tray containers. Sets the border and layout. The container
15 // auto-resizes the widget when necessary.
16 class TrayContainer : public views::View {
17 public:
18 explicit TrayContainer(WmShelf* wm_shelf);
19 ~TrayContainer() override;
20
21 void UpdateAfterShelfAlignmentChange();
22
23 void SetMargin(int main_axis_margin, int cross_axis_margin);
24
25 protected:
26 // views::View:
27 void ChildPreferredSizeChanged(views::View* child) override;
28 void ChildVisibilityChanged(View* child) override;
29 void ViewHierarchyChanged(
30 const ViewHierarchyChangedDetails& details) override;
31
32 private:
33 void UpdateLayout();
34
35 WmShelf* const wm_shelf_;
36
37 int main_axis_margin_ = 0;
38 int cross_axis_margin_ = 0;
39
40 DISALLOW_COPY_AND_ASSIGN(TrayContainer);
41 };
42
43 } // namespace ash
44
45 #endif // ASH_SYSTEM_TRAY_TRAY_CONTAINER_H_
OLDNEW
« no previous file with comments | « ash/system/tray/tray_background_view.cc ('k') | ash/system/tray/tray_container.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698