| Index: ash/system/tray/tray_container.h
|
| diff --git a/ash/system/tray/tray_container.h b/ash/system/tray/tray_container.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..c4c7ea76791c0c765b42ff9c0e1a419a7923d5e5
|
| --- /dev/null
|
| +++ b/ash/system/tray/tray_container.h
|
| @@ -0,0 +1,45 @@
|
| +// Copyright 2017 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef ASH_SYSTEM_TRAY_TRAY_CONTAINER_H_
|
| +#define ASH_SYSTEM_TRAY_TRAY_CONTAINER_H_
|
| +
|
| +#include "base/macros.h"
|
| +#include "ui/views/view.h"
|
| +
|
| +namespace ash {
|
| +class WmShelf;
|
| +
|
| +// Base class for tray containers. Sets the border and layout. The container
|
| +// auto-resizes the widget when necessary.
|
| +class TrayContainer : public views::View {
|
| + public:
|
| + explicit TrayContainer(WmShelf* wm_shelf);
|
| + ~TrayContainer() override;
|
| +
|
| + void UpdateAfterShelfAlignmentChange();
|
| +
|
| + void SetMargin(int main_axis_margin, int cross_axis_margin);
|
| +
|
| + protected:
|
| + // views::View:
|
| + void ChildPreferredSizeChanged(views::View* child) override;
|
| + void ChildVisibilityChanged(View* child) override;
|
| + void ViewHierarchyChanged(
|
| + const ViewHierarchyChangedDetails& details) override;
|
| +
|
| + private:
|
| + void UpdateLayout();
|
| +
|
| + WmShelf* const wm_shelf_;
|
| +
|
| + int main_axis_margin_ = 0;
|
| + int cross_axis_margin_ = 0;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(TrayContainer);
|
| +};
|
| +
|
| +} // namespace ash
|
| +
|
| +#endif // ASH_SYSTEM_TRAY_TRAY_CONTAINER_H_
|
|
|