Chromium Code Reviews| Index: ash/common/system/tray/tray_popup_layout_factory.h |
| diff --git a/ash/common/system/tray/tray_popup_layout_factory.h b/ash/common/system/tray/tray_popup_layout_factory.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..683662f871c698b03fa6e57518ddace089e5157c |
| --- /dev/null |
| +++ b/ash/common/system/tray/tray_popup_layout_factory.h |
| @@ -0,0 +1,53 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef ASH_COMMON_SYSTEM_TRAY_TRAY_POPUP_LAYOUT_FACTORY_H_ |
| +#define ASH_COMMON_SYSTEM_TRAY_TRAY_POPUP_LAYOUT_FACTORY_H_ |
| + |
| +#include <memory> |
| + |
| +#include "ash/common/system/tray/tri_view.h" |
| +#include "base/macros.h" |
| + |
| +namespace views { |
| +class View; |
| +} // namespace views |
| + |
| +namespace ash { |
| + |
| +// Factory functions for system menu row container views. |
| +class TrayPopupLayoutFactory { |
| + public: |
| + // Creates a default container view to be used most system menu rows. The |
| + // caller takes over ownership of the created view. |
| + // |
| + // The returned view consists of 3 regions: START, CENTER, and END. Any child |
| + // Views added to the START and END containers will be added horizonatlly and |
| + // any Views added to the CENTER container will be added vertically. |
| + // |
| + // The START and END containers have a fixed width but can grow into the |
| + // CENTER container if space is required and available. |
| + // |
| + // The CENTER container has a flexible width. |
| + static TriView* CreateDefaultRowView(); |
| + |
| + // Configures the different |container| views with the default layout |
| + // managers. |
| + // |
| + // This can be used by clients who need to embed portions of the default |
| + // layout manager into a different container view, e.g. just the END layout |
| + // 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
|
| + static void ConfigureDefaultLayout(TriView* layout, |
| + TriView::Container container); |
| + |
| + private: |
| + TrayPopupLayoutFactory(); |
| + ~TrayPopupLayoutFactory(); |
| + |
| + DISALLOW_COPY_AND_ASSIGN(TrayPopupLayoutFactory); |
| +}; |
| + |
| +} // namespace ash |
| + |
| +#endif // ASH_COMMON_SYSTEM_TRAY_TRAY_POPUP_LAYOUT_FACTORY_H_ |