Windows should animate when they are about to get docked at screen edges.
[chromium-blink-merge.git] / ash / system / tray / tray_details_view.h
blob073873ad0d9a190395ea9762e218af74f3272750
1 // Copyright (c) 2012 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.
5 #ifndef ASH_SYSTEM_TRAY_TRAY_DETAILS_VIEW_H_
6 #define ASH_SYSTEM_TRAY_TRAY_DETAILS_VIEW_H_
8 #include "ash/system/tray/special_popup_row.h"
9 #include "ui/views/view.h"
11 namespace views {
12 class ScrollView;
15 namespace ash {
17 class SystemTrayItem;
19 namespace internal {
21 class FixedSizedScrollView;
22 class ScrollBorder;
23 class ViewClickListener;
25 class TrayDetailsView : public views::View {
26 public:
27 explicit TrayDetailsView(SystemTrayItem* owner);
28 virtual ~TrayDetailsView();
30 // Creates a row with special highlighting etc. This is typically the
31 // bottom-most row in the popup.
32 void CreateSpecialRow(int string_id, ViewClickListener* listener);
34 // Creates a scrollable list. The list has a border at the bottom if there is
35 // any other view between the list and the footer row at the bottom.
36 void CreateScrollableList();
38 // Adds a separator in scrollable list.
39 void AddScrollSeparator();
41 // Removes (and destroys) all child views.
42 void Reset();
44 SystemTrayItem* owner() const { return owner_; }
45 SpecialPopupRow* footer() const { return footer_; }
46 FixedSizedScrollView* scroller() const { return scroller_; }
47 views::View* scroll_content() const { return scroll_content_; }
49 protected:
50 // Overridden from views::View.
51 virtual void Layout() OVERRIDE;
52 virtual void OnPaintBorder(gfx::Canvas* canvas) OVERRIDE;
54 private:
55 SystemTrayItem* owner_;
56 SpecialPopupRow* footer_;
57 FixedSizedScrollView* scroller_;
58 views::View* scroll_content_;
59 ScrollBorder* scroll_border_;
61 DISALLOW_COPY_AND_ASSIGN(TrayDetailsView);
64 } // namespace internal
65 } // namespace ash
67 #endif // ASH_SYSTEM_TRAY_TRAY_DETAILS_VIEW_H_