OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef ASH_SYSTEM_TRAY_TRAY_POPUP_UTILS_H_ | 5 #ifndef ASH_SYSTEM_TRAY_TRAY_POPUP_UTILS_H_ |
6 #define ASH_SYSTEM_TRAY_TRAY_POPUP_UTILS_H_ | 6 #define ASH_SYSTEM_TRAY_TRAY_POPUP_UTILS_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "ash/login_status.h" | 10 #include "ash/login_status.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 // | 47 // |
48 // The START and END containers have a fixed minimum width but can grow into | 48 // The START and END containers have a fixed minimum width but can grow into |
49 // the CENTER container if space is required and available. | 49 // the CENTER container if space is required and available. |
50 // | 50 // |
51 // The CENTER container has a flexible width. | 51 // The CENTER container has a flexible width. |
52 static TriView* CreateDefaultRowView(); | 52 static TriView* CreateDefaultRowView(); |
53 | 53 |
54 // Creates a container view to be used by system menu sub-section header rows. | 54 // Creates a container view to be used by system menu sub-section header rows. |
55 // The caller takes over ownership of the created view. | 55 // The caller takes over ownership of the created view. |
56 // | 56 // |
57 // The returned view consists of 2 regions: CENTER, and END having the same | 57 // The returned view contains at least CENTER and END regions having the same |
58 // properties as when using |CreateMultiTargetRowView|. The START container is | 58 // properties as when using |CreateMultiTargetRowView|. |start_visible| |
59 // hidden. | 59 // determines whether the START region should be visible or not. If START is |
60 // The END container has a fixed minimum width but can grow into the CENTER | 60 // not visible, extra padding is added to the left of the contents. |
61 // container if space is required and available. The CENTER container has a | 61 // |
62 // flexible width. | 62 // The START (if visible) and END containers have a fixed minimum width but |
63 static TriView* CreateSubHeaderRowView(); | 63 // can grow into the CENTER container if space is required and available. The |
| 64 // CENTER container has a flexible width. |
| 65 // |
| 66 // TODO(mohsen): Merge this into TrayDetailsView::AddScrollListSubHeader() |
| 67 // once network and VPN alse use TrayDetailsView::AddScrollListSubHeader(). |
| 68 static TriView* CreateSubHeaderRowView(bool start_visible); |
64 | 69 |
65 // Creates a view containing only a label (corresponding to |message_id|), | 70 // Creates a view containing only a label (corresponding to |message_id|), |
66 // which is to be inserted as a non-targetable row within a system menu | 71 // which is to be inserted as a non-targetable row within a system menu |
67 // detailed view (e.g., the "Scanning for devices..." message that can appear | 72 // detailed view (e.g., the "Scanning for devices..." message that can appear |
68 // at the top of the Bluetooth detailed view). The caller takes over ownership | 73 // at the top of the Bluetooth detailed view). The caller takes over ownership |
69 // of the created view. | 74 // of the created view. |
70 static views::View* CreateInfoLabelRowView(int message_id); | 75 static views::View* CreateInfoLabelRowView(int message_id); |
71 | 76 |
72 // Creates a container view to be used by system menu rows that want to embed | 77 // Creates a container view to be used by system menu rows that want to embed |
73 // a targetable area within one (or more) of the containers OR by any row | 78 // a targetable area within one (or more) of the containers OR by any row |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 // |ink_drop_style|. | 234 // |ink_drop_style|. |
230 static gfx::Rect GetInkDropBounds(TrayPopupInkDropStyle ink_drop_style, | 235 static gfx::Rect GetInkDropBounds(TrayPopupInkDropStyle ink_drop_style, |
231 const views::View* host); | 236 const views::View* host); |
232 | 237 |
233 DISALLOW_IMPLICIT_CONSTRUCTORS(TrayPopupUtils); | 238 DISALLOW_IMPLICIT_CONSTRUCTORS(TrayPopupUtils); |
234 }; | 239 }; |
235 | 240 |
236 } // namespace ash | 241 } // namespace ash |
237 | 242 |
238 #endif // ASH_SYSTEM_TRAY_TRAY_POPUP_UTILS_H_ | 243 #endif // ASH_SYSTEM_TRAY_TRAY_POPUP_UTILS_H_ |
OLD | NEW |