| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef ASH_COMMON_SYSTEM_TRAY_TRAY_POPUP_UTILS_H_ | 5 #ifndef ASH_COMMON_SYSTEM_TRAY_TRAY_POPUP_UTILS_H_ |
| 6 #define ASH_COMMON_SYSTEM_TRAY_TRAY_POPUP_UTILS_H_ | 6 #define ASH_COMMON_SYSTEM_TRAY_TRAY_POPUP_UTILS_H_ |
| 7 | 7 |
| 8 #include "ash/common/login_status.h" | 8 #include "ash/common/login_status.h" |
| 9 #include "ash/common/system/tray/tri_view.h" | 9 #include "ash/common/system/tray/tri_view.h" |
| 10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 // is used for all 'more' images as well as other images that appear in this | 78 // is used for all 'more' images as well as other images that appear in this |
| 79 // region, e.g. audio output icon. | 79 // region, e.g. audio output icon. |
| 80 // | 80 // |
| 81 // TODO(bruthig): Update all default rows to use this. | 81 // TODO(bruthig): Update all default rows to use this. |
| 82 static views::ImageView* CreateMoreImageView(); | 82 static views::ImageView* CreateMoreImageView(); |
| 83 | 83 |
| 84 // Returns a slider configured for proper layout within a TriView container | 84 // Returns a slider configured for proper layout within a TriView container |
| 85 // with a FillLayout. | 85 // with a FillLayout. |
| 86 static views::Slider* CreateSlider(views::SliderListener* listener); | 86 static views::Slider* CreateSlider(views::SliderListener* listener); |
| 87 | 87 |
| 88 // Sets up |view| to be a sticky header in a tray detail scroll view. |
| 89 static void ConfigureAsStickyHeader(views::View* view); |
| 90 |
| 88 // Configures |container_view| just like CreateDefaultRowView() would | 91 // Configures |container_view| just like CreateDefaultRowView() would |
| 89 // configure |container| on its returned TriView. To be used when mutliple | 92 // configure |container| on its returned TriView. To be used when mutliple |
| 90 // targetable areas are required within a single row. | 93 // targetable areas are required within a single row. |
| 91 static void ConfigureContainer(TriView::Container container, | 94 static void ConfigureContainer(TriView::Container container, |
| 92 views::View* container_view); | 95 views::View* container_view); |
| 93 | 96 |
| 94 // Creates a button for use in the system menu that only has a visible border | 97 // Creates a button for use in the system menu that only has a visible border |
| 95 // when being hovered/clicked. Caller assumes ownership. | 98 // when being hovered/clicked. Caller assumes ownership. |
| 96 static views::LabelButton* CreateTrayPopupBorderlessButton( | 99 static views::LabelButton* CreateTrayPopupBorderlessButton( |
| 97 views::ButtonListener* listener, | 100 views::ButtonListener* listener, |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 | 134 |
| 132 // Returns the default border used by CreateDefaultRow() and | 135 // Returns the default border used by CreateDefaultRow() and |
| 133 // ConfigureContainer() for the given |container|. | 136 // ConfigureContainer() for the given |container|. |
| 134 static std::unique_ptr<views::Border> CreateDefaultBorder( | 137 static std::unique_ptr<views::Border> CreateDefaultBorder( |
| 135 TriView::Container container); | 138 TriView::Container container); |
| 136 }; | 139 }; |
| 137 | 140 |
| 138 } // namespace ash | 141 } // namespace ash |
| 139 | 142 |
| 140 #endif // ASH_COMMON_SYSTEM_TRAY_TRAY_POPUP_UTILS_H_ | 143 #endif // ASH_COMMON_SYSTEM_TRAY_TRAY_POPUP_UTILS_H_ |
| OLD | NEW |