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

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

Issue 2414103003: Added common layout framework for system menu rows. (Closed)
Patch Set: Moved |layout_manager_| destruction order in ~View(). Created 4 years, 2 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
(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/three_view_layout.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 layout managers.
20 class TrayPopupLayoutFactory {
21 public:
22 // Sets the layout manager of |host| to the default layout manager used by
23 // most system menu rows. The newly created layout manager is owned by the
24 // |host| but is returned so child Views can be added.
25 //
26 // The returned layout manager consists of 3 regions: START, CENTER, and END.
27 // Any child Views added to the START and END containers will be added
28 // horizonatlly and any Views added to the CENTER container will be added
29 // vertically.
30 //
31 // The START and END containers have a fixed width but can grow into the
32 // CENTER container if space is required and available.
33 //
34 // The CENTER container has a flexible width.
35 static ThreeViewLayout* InstallDefaultLayout(views::View* host);
36
37 // Configures the different |container| Views with the default layout
38 // managers.
39 //
40 // This can be used by clients who need to embed portions of the default
41 // layout manager into a different container view, e.g. just the END layout
42 // into a clickable View.
43 static void ConfigureDefaultLayout(ThreeViewLayout* layout,
44 ThreeViewLayout::Container container);
45
46 private:
47 TrayPopupLayoutFactory();
48 ~TrayPopupLayoutFactory();
49
50 DISALLOW_COPY_AND_ASSIGN(TrayPopupLayoutFactory);
51 };
52
53 } // namespace ash
54
55 #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