Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(213)

Side by Side Diff: ash/wm/shelf_layout_manager_unittest.cc

Issue 11415014: Stop using shell::GetInstance()->system_tray() in system tray items (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed unnecessary forward declarations. Renamed |tray| to |owner|. Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« ash/system/user/tray_user.cc ('K') | « ash/system/user/tray_user.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 : SytemTrayItem(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
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
OLDNEW
« ash/system/user/tray_user.cc ('K') | « ash/system/user/tray_user.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698