| 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/wm/shelf_layout_manager.h" | 5 #include "ash/wm/shelf_layout_manager.h" |
| 6 | 6 |
| 7 #include "ash/accelerators/accelerator_controller.h" | 7 #include "ash/accelerators/accelerator_controller.h" |
| 8 #include "ash/accelerators/accelerator_table.h" | 8 #include "ash/accelerators/accelerator_table.h" |
| 9 #include "ash/ash_switches.h" | 9 #include "ash/ash_switches.h" |
| 10 #include "ash/display/display_manager.h" | 10 #include "ash/display/display_manager.h" |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 | 73 |
| 74 bool changed_auto_hide_state_; | 74 bool changed_auto_hide_state_; |
| 75 | 75 |
| 76 DISALLOW_COPY_AND_ASSIGN(ShelfLayoutObserverTest); | 76 DISALLOW_COPY_AND_ASSIGN(ShelfLayoutObserverTest); |
| 77 }; | 77 }; |
| 78 | 78 |
| 79 // Trivial item implementation that tracks its views for testing. | 79 // Trivial item implementation that tracks its views for testing. |
| 80 class TestItem : public SystemTrayItem { | 80 class TestItem : public SystemTrayItem { |
| 81 public: | 81 public: |
| 82 TestItem() | 82 TestItem() |
| 83 : tray_view_(NULL), | 83 : SystemTrayItem(Shell::GetInstance()->system_tray()), |
| 84 tray_view_(NULL), |
| 84 default_view_(NULL), | 85 default_view_(NULL), |
| 85 detailed_view_(NULL), | 86 detailed_view_(NULL), |
| 86 notification_view_(NULL) {} | 87 notification_view_(NULL) {} |
| 87 | 88 |
| 88 virtual views::View* CreateTrayView(user::LoginStatus status) OVERRIDE { | 89 virtual views::View* CreateTrayView(user::LoginStatus status) OVERRIDE { |
| 89 tray_view_ = new views::View; | 90 tray_view_ = new views::View; |
| 90 // Add a label so it has non-zero width. | 91 // Add a label so it has non-zero width. |
| 91 tray_view_->SetLayoutManager(new views::FillLayout); | 92 tray_view_->SetLayoutManager(new views::FillLayout); |
| 92 tray_view_->AddChildView(new views::Label(UTF8ToUTF16("Tray"))); | 93 tray_view_->AddChildView(new views::Label(UTF8ToUTF16("Tray"))); |
| 93 return tray_view_; | 94 return tray_view_; |
| (...skipping 878 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 972 EXPECT_TRUE(status_area_widget->IsMessageBubbleShown()); | 973 EXPECT_TRUE(status_area_widget->IsMessageBubbleShown()); |
| 973 } else { | 974 } else { |
| 974 EXPECT_FALSE(shelf->IsVisible()); | 975 EXPECT_FALSE(shelf->IsVisible()); |
| 975 EXPECT_FALSE(status_area_widget->IsMessageBubbleShown()); | 976 EXPECT_FALSE(status_area_widget->IsMessageBubbleShown()); |
| 976 } | 977 } |
| 977 } | 978 } |
| 978 } | 979 } |
| 979 | 980 |
| 980 } // namespace internal | 981 } // namespace internal |
| 981 } // namespace ash | 982 } // namespace ash |
| OLD | NEW |