| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/tray_details_view.h" | 5 #include "ash/common/system/tray/tray_details_view.h" |
| 6 | 6 |
| 7 #include "ash/common/system/tray/hover_highlight_view.h" | 7 #include "ash/common/system/tray/hover_highlight_view.h" |
| 8 #include "ash/common/system/tray/special_popup_row.h" | 8 #include "ash/common/system/tray/special_popup_row.h" |
| 9 #include "ash/common/system/tray/system_tray.h" | 9 #include "ash/common/system/tray/system_tray.h" |
| 10 #include "ash/common/system/tray/system_tray_item.h" | 10 #include "ash/common/system/tray/system_tray_item.h" |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 private: | 58 private: |
| 59 TrayPopupHeaderButton* tray_popup_header_button_; | 59 TrayPopupHeaderButton* tray_popup_header_button_; |
| 60 | 60 |
| 61 DISALLOW_COPY_AND_ASSIGN(TestDetailsView); | 61 DISALLOW_COPY_AND_ASSIGN(TestDetailsView); |
| 62 }; | 62 }; |
| 63 | 63 |
| 64 // Trivial item implementation that tracks its views for testing. | 64 // Trivial item implementation that tracks its views for testing. |
| 65 class TestItem : public SystemTrayItem { | 65 class TestItem : public SystemTrayItem { |
| 66 public: | 66 public: |
| 67 TestItem() | 67 TestItem() |
| 68 : SystemTrayItem(AshTestBase::GetPrimarySystemTray()), | 68 : SystemTrayItem(AshTestBase::GetPrimarySystemTray(), UMA_TEST), |
| 69 tray_view_(nullptr), | 69 tray_view_(nullptr), |
| 70 default_view_(nullptr), | 70 default_view_(nullptr), |
| 71 detailed_view_(nullptr) {} | 71 detailed_view_(nullptr) {} |
| 72 | 72 |
| 73 // Overridden from SystemTrayItem: | 73 // Overridden from SystemTrayItem: |
| 74 views::View* CreateTrayView(LoginStatus status) override { | 74 views::View* CreateTrayView(LoginStatus status) override { |
| 75 tray_view_ = new views::View; | 75 tray_view_ = new views::View; |
| 76 return tray_view_; | 76 return tray_view_; |
| 77 } | 77 } |
| 78 views::View* CreateDefaultView(LoginStatus status) override { | 78 views::View* CreateDefaultView(LoginStatus status) override { |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 gfx::Rect bounds = button->GetBoundsInScreen(); | 264 gfx::Rect bounds = button->GetBoundsInScreen(); |
| 265 gfx::Point initial_point(bounds.x() - 1, bounds.y()); | 265 gfx::Point initial_point(bounds.x() - 1, bounds.y()); |
| 266 generator.set_current_location(initial_point); | 266 generator.set_current_location(initial_point); |
| 267 generator.MoveMouseBy(1, 0); | 267 generator.MoveMouseBy(1, 0); |
| 268 RunAllPendingInMessageLoop(); | 268 RunAllPendingInMessageLoop(); |
| 269 EXPECT_TRUE(button->background()); | 269 EXPECT_TRUE(button->background()); |
| 270 } | 270 } |
| 271 | 271 |
| 272 } // namespace test | 272 } // namespace test |
| 273 } // namespace ash | 273 } // namespace ash |
| OLD | NEW |