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/ash_export.h"
9 #include "ash/system/tray/special_popup_row.h"
10 #include "ui/views/view.h"
17 class FixedSizedScrollView
;
20 class ViewClickListener
;
22 class ASH_EXPORT TrayDetailsView
: public views::View
{
24 explicit TrayDetailsView(SystemTrayItem
* owner
);
25 ~TrayDetailsView() override
;
27 // Creates a row with special highlighting etc. This is typically the
28 // bottom-most row in the popup.
29 void CreateSpecialRow(int string_id
, ViewClickListener
* listener
);
31 // Creates a scrollable list. The list has a border at the bottom if there is
32 // any other view between the list and the footer row at the bottom.
33 void CreateScrollableList();
35 // Adds a separator in scrollable list.
36 void AddScrollSeparator();
38 // Removes (and destroys) all child views.
41 // Transition to default view from details view. If |footer_| has focus before
42 // transition, the default view should focus on the owner of this details
44 void TransitionToDefaultView();
46 SystemTrayItem
* owner() const { return owner_
; }
47 SpecialPopupRow
* footer() const { return footer_
; }
48 FixedSizedScrollView
* scroller() const { return scroller_
; }
49 views::View
* scroll_content() const { return scroll_content_
; }
52 // Overridden from views::View.
53 void Layout() override
;
54 void OnPaintBorder(gfx::Canvas
* canvas
) override
;
57 SystemTrayItem
* owner_
;
58 SpecialPopupRow
* footer_
;
59 FixedSizedScrollView
* scroller_
;
60 views::View
* scroll_content_
;
61 ScrollBorder
* scroll_border_
; // Weak reference
63 DISALLOW_COPY_AND_ASSIGN(TrayDetailsView
);
68 #endif // ASH_SYSTEM_TRAY_TRAY_DETAILS_VIEW_H_