| 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 17 matching lines...) Expand all Loading... |
| 115 // account flow. | 118 // account flow. |
| 116 static bool CanOpenWebUISettings(LoginStatus status); | 119 static bool CanOpenWebUISettings(LoginStatus status); |
| 117 | 120 |
| 118 private: | 121 private: |
| 119 DISALLOW_IMPLICIT_CONSTRUCTORS(TrayPopupUtils); | 122 DISALLOW_IMPLICIT_CONSTRUCTORS(TrayPopupUtils); |
| 120 }; | 123 }; |
| 121 | 124 |
| 122 } // namespace ash | 125 } // namespace ash |
| 123 | 126 |
| 124 #endif // ASH_COMMON_SYSTEM_TRAY_TRAY_POPUP_UTILS_H_ | 127 #endif // ASH_COMMON_SYSTEM_TRAY_TRAY_POPUP_UTILS_H_ |
| OLD | NEW |