| 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 "ash/common/key_event_watcher.h" | 7 #include "ash/common/key_event_watcher.h" |
| 8 #include "ash/common/login_status.h" | 8 #include "ash/common/login_status.h" |
| 9 #include "ash/common/material_design/material_design_controller.h" | 9 #include "ash/common/material_design/material_design_controller.h" |
| 10 #include "ash/common/session/session_state_delegate.h" | 10 #include "ash/common/session/session_state_delegate.h" |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 } | 89 } |
| 90 | 90 |
| 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 return gfx::Size(GetTrayConstant(TRAY_IMAGE_ITEM_PADDING), | 99 // The other tray items already have some padding baked in so we have to |
| 100 GetTrayConstant(TRAY_IMAGE_ITEM_PADDING)); | 100 // subtract that off. |
| 101 const int side = |
| 102 kTrayEdgePadding - GetTrayConstant(TRAY_IMAGE_ITEM_PADDING); |
| 103 return gfx::Size(side, side); |
| 101 } | 104 } |
| 102 | 105 |
| 103 DISALLOW_COPY_AND_ASSIGN(PaddingView); | 106 DISALLOW_COPY_AND_ASSIGN(PaddingView); |
| 104 }; | 107 }; |
| 105 | 108 |
| 106 DISALLOW_COPY_AND_ASSIGN(PaddingTrayItem); | 109 DISALLOW_COPY_AND_ASSIGN(PaddingTrayItem); |
| 107 }; | 110 }; |
| 108 | 111 |
| 109 } // namespace | 112 } // namespace |
| 110 | 113 |
| (...skipping 840 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 951 .work_area() | 954 .work_area() |
| 952 .height(); | 955 .height(); |
| 953 if (work_area_height > 0) { | 956 if (work_area_height > 0) { |
| 954 UMA_HISTOGRAM_CUSTOM_COUNTS( | 957 UMA_HISTOGRAM_CUSTOM_COUNTS( |
| 955 "Ash.SystemMenu.PercentageOfWorkAreaHeightCoveredByMenu", | 958 "Ash.SystemMenu.PercentageOfWorkAreaHeightCoveredByMenu", |
| 956 100 * bubble_view->height() / work_area_height, 1, 300, 100); | 959 100 * bubble_view->height() / work_area_height, 1, 300, 100); |
| 957 } | 960 } |
| 958 } | 961 } |
| 959 | 962 |
| 960 } // namespace ash | 963 } // namespace ash |
| OLD | NEW |