OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/tray/system_tray.h" | 5 #include "ash/common/system/tray/system_tray.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <map> | 8 #include <map> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 private: | 91 private: |
92 class PaddingView : public views::View { | 92 class PaddingView : public views::View { |
93 public: | 93 public: |
94 PaddingView() {} | 94 PaddingView() {} |
95 ~PaddingView() override {} | 95 ~PaddingView() override {} |
96 | 96 |
97 private: | 97 private: |
98 gfx::Size GetPreferredSize() const override { | 98 gfx::Size GetPreferredSize() const override { |
99 // The other tray items already have some padding baked in so we have to | 99 // The other tray items already have some padding baked in so we have to |
100 // subtract that off. | 100 // subtract that off. |
101 const int side = | 101 const int side = kTrayEdgePadding - kTrayImageItemPadding; |
102 kTrayEdgePadding - GetTrayConstant(TRAY_IMAGE_ITEM_PADDING); | |
103 return gfx::Size(side, side); | 102 return gfx::Size(side, side); |
104 } | 103 } |
105 | 104 |
106 DISALLOW_COPY_AND_ASSIGN(PaddingView); | 105 DISALLOW_COPY_AND_ASSIGN(PaddingView); |
107 }; | 106 }; |
108 | 107 |
109 DISALLOW_COPY_AND_ASSIGN(PaddingTrayItem); | 108 DISALLOW_COPY_AND_ASSIGN(PaddingTrayItem); |
110 }; | 109 }; |
111 | 110 |
112 } // namespace | 111 } // namespace |
(...skipping 775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
888 .work_area() | 887 .work_area() |
889 .height(); | 888 .height(); |
890 if (work_area_height > 0) { | 889 if (work_area_height > 0) { |
891 UMA_HISTOGRAM_CUSTOM_COUNTS( | 890 UMA_HISTOGRAM_CUSTOM_COUNTS( |
892 "Ash.SystemMenu.PercentageOfWorkAreaHeightCoveredByMenu", | 891 "Ash.SystemMenu.PercentageOfWorkAreaHeightCoveredByMenu", |
893 100 * bubble_view->height() / work_area_height, 1, 300, 100); | 892 100 * bubble_view->height() / work_area_height, 1, 300, 100); |
894 } | 893 } |
895 } | 894 } |
896 | 895 |
897 } // namespace ash | 896 } // namespace ash |
OLD | NEW |