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

Side by Side Diff: ash/common/system/tray/tray_popup_layout_factory.h

Issue 2439093002: Reland of "Added common layout framework for system menu rows." (Closed)
Patch Set: Addressed review comments. Created 4 years, 1 month 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
(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 private:
36 TrayPopupLayoutFactory();
37 ~TrayPopupLayoutFactory();
38
39 // Configures the specified |container| view with the default layout. Used by
40 // CreateDefaultRowView().
41 static void ConfigureDefaultLayout(TriView* tri_view,
42 TriView::Container container);
43
44 DISALLOW_COPY_AND_ASSIGN(TrayPopupLayoutFactory);
45 };
46
47 } // namespace ash
48
49 #endif // ASH_COMMON_SYSTEM_TRAY_TRAY_POPUP_LAYOUT_FACTORY_H_
OLDNEW
« no previous file with comments | « ash/common/system/tray/tray_constants.cc ('k') | ash/common/system/tray/tray_popup_layout_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698