OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef ASH_COMMON_SYSTEM_TRAY_TRAY_POPUP_LAYOUT_FACTORY_H_ | |
6 #define ASH_COMMON_SYSTEM_TRAY_TRAY_POPUP_LAYOUT_FACTORY_H_ | |
7 | |
8 #include <memory> | |
9 | |
10 #include "ash/common/system/tray/tri_view.h" | |
11 #include "base/macros.h" | |
12 | |
13 namespace views { | |
14 class View; | |
15 } // namespace views | |
16 | |
17 namespace ash { | |
18 | |
19 // Factory functions for system menu row container views. | |
20 class TrayPopupLayoutFactory { | |
21 public: | |
22 // Creates a default container view to be used most system menu rows. The | |
23 // caller takes over ownership of the created view. | |
24 // | |
25 // The returned view consists of 3 regions: START, CENTER, and END. Any child | |
26 // Views added to the START and END containers will be added horizonatlly and | |
27 // any Views added to the CENTER container will be added vertically. | |
28 // | |
29 // The START and END containers have a fixed width but can grow into the | |
30 // CENTER container if space is required and available. | |
31 // | |
32 // The CENTER container has a flexible width. | |
33 static TriView* CreateDefaultRowView(); | |
34 | |
35 // Configures the different |container| views with the default layout | |
36 // managers. | |
37 // | |
38 // This can be used by clients who need to embed portions of the default | |
39 // layout manager into a different container view, e.g. just the END layout | |
40 // into a clickable View. | |
tdanderson
2016/10/26 19:29:12
nit: I think this comment needs updating (should n
bruthig
2016/10/26 21:24:16
Moved to private and updated the comment. Since t
| |
41 static void ConfigureDefaultLayout(TriView* layout, | |
42 TriView::Container container); | |
43 | |
44 private: | |
45 TrayPopupLayoutFactory(); | |
46 ~TrayPopupLayoutFactory(); | |
47 | |
48 DISALLOW_COPY_AND_ASSIGN(TrayPopupLayoutFactory); | |
49 }; | |
50 | |
51 } // namespace ash | |
52 | |
53 #endif // ASH_COMMON_SYSTEM_TRAY_TRAY_POPUP_LAYOUT_FACTORY_H_ | |
OLD | NEW |