Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(366)

Side by Side Diff: ash/system/tray/tray_popup_utils.h

Issue 2831023003: Refactor AddScrollListItem() in system menu detailed views (Closed)
Patch Set: Cleanup Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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|. |hide_start|
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, padding would be increased on that side.
tdanderson 2017/04/24 15:43:39 I'm not sure about the last sentence here. If STAR
mohsen 2017/04/25 05:10:01 What I meant is that when START is not visible, we
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 static TriView* CreateSubHeaderRowView(bool hide_start);
tdanderson 2017/04/24 15:43:39 optional: I don't think this is called out explici
mohsen 2017/04/25 05:10:02 Makes sense. Done.
64 66
65 // Creates a view containing only a label (corresponding to |message_id|), 67 // 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 68 // 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 69 // 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 70 // at the top of the Bluetooth detailed view). The caller takes over ownership
69 // of the created view. 71 // of the created view.
70 static views::View* CreateInfoLabelRowView(int message_id); 72 static views::View* CreateInfoLabelRowView(int message_id);
71 73
72 // Creates a container view to be used by system menu rows that want to embed 74 // 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 75 // 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
229 // |ink_drop_style|. 231 // |ink_drop_style|.
230 static gfx::Rect GetInkDropBounds(TrayPopupInkDropStyle ink_drop_style, 232 static gfx::Rect GetInkDropBounds(TrayPopupInkDropStyle ink_drop_style,
231 const views::View* host); 233 const views::View* host);
232 234
233 DISALLOW_IMPLICIT_CONSTRUCTORS(TrayPopupUtils); 235 DISALLOW_IMPLICIT_CONSTRUCTORS(TrayPopupUtils);
234 }; 236 };
235 237
236 } // namespace ash 238 } // namespace ash
237 239
238 #endif // ASH_SYSTEM_TRAY_TRAY_POPUP_UTILS_H_ 240 #endif // ASH_SYSTEM_TRAY_TRAY_POPUP_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698