| 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 #include "ash/common/system/date/system_info_default_view.h" | 5 #include "ash/system/date/system_info_default_view.h" |
| 6 | 6 |
| 7 #include "ash/common/system/chromeos/power/power_status.h" | 7 #include "ash/system/date/date_view.h" |
| 8 #include "ash/common/system/chromeos/power/power_status_view.h" | 8 #include "ash/system/power/power_status.h" |
| 9 #include "ash/common/system/date/date_view.h" | 9 #include "ash/system/power/power_status_view.h" |
| 10 #include "ash/common/system/tray/tray_constants.h" | 10 #include "ash/system/tray/tray_constants.h" |
| 11 #include "ash/common/system/tray/tray_popup_utils.h" | 11 #include "ash/system/tray/tray_popup_utils.h" |
| 12 #include "ash/common/system/tray/tri_view.h" | 12 #include "ash/system/tray/tri_view.h" |
| 13 #include "base/memory/ptr_util.h" | 13 #include "base/memory/ptr_util.h" |
| 14 #include "ui/views/controls/separator.h" | 14 #include "ui/views/controls/separator.h" |
| 15 #include "ui/views/layout/box_layout.h" | 15 #include "ui/views/layout/box_layout.h" |
| 16 #include "ui/views/layout/fill_layout.h" | 16 #include "ui/views/layout/fill_layout.h" |
| 17 | 17 |
| 18 namespace ash { | 18 namespace ash { |
| 19 | 19 |
| 20 // The minimum number of menu button widths that the date view should span | 20 // The minimum number of menu button widths that the date view should span |
| 21 // horizontally. | 21 // horizontally. |
| 22 const int kMinNumTileWidths = 2; | 22 const int kMinNumTileWidths = 2; |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 num_extra_tile_widths = std::ceil(preferred_width_ratio); | 86 num_extra_tile_widths = std::ceil(preferred_width_ratio); |
| 87 } | 87 } |
| 88 num_extra_tile_widths = | 88 num_extra_tile_widths = |
| 89 std::max(kMinNumTileWidths - 1, | 89 std::max(kMinNumTileWidths - 1, |
| 90 std::min(num_extra_tile_widths, kMaxNumTileWidths - 1)); | 90 std::min(num_extra_tile_widths, kMaxNumTileWidths - 1)); |
| 91 | 91 |
| 92 return kMenuButtonSize + num_extra_tile_widths * snap_to_width; | 92 return kMenuButtonSize + num_extra_tile_widths * snap_to_width; |
| 93 } | 93 } |
| 94 | 94 |
| 95 } // namespace ash | 95 } // namespace ash |
| OLD | NEW |