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 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_ |
OLD | NEW |