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"
21 class FixedSizedScrollView
;
23 class ViewClickListener
;
25 class TrayDetailsView
: public views::View
{
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.
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_
; }
50 // Overridden from views::View.
51 virtual void Layout() OVERRIDE
;
52 virtual void OnPaintBorder(gfx::Canvas
* canvas
) OVERRIDE
;
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
67 #endif // ASH_SYSTEM_TRAY_TRAY_DETAILS_VIEW_H_