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

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: 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
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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 notification_view_(NULL) {} 86 notification_view_(NULL) {}
87 87
88 virtual views::View* CreateTrayView(user::LoginStatus status) OVERRIDE { 88 virtual views::View* CreateTrayView(user::LoginStatus status) OVERRIDE {
89 tray_view_ = new views::View; 89 tray_view_ = new views::View;
90 // Add a label so it has non-zero width. 90 // Add a label so it has non-zero width.
91 tray_view_->SetLayoutManager(new views::FillLayout); 91 tray_view_->SetLayoutManager(new views::FillLayout);
92 tray_view_->AddChildView(new views::Label(UTF8ToUTF16("Tray"))); 92 tray_view_->AddChildView(new views::Label(UTF8ToUTF16("Tray")));
93 return tray_view_; 93 return tray_view_;
94 } 94 }
95 95
96 virtual views::View* CreateDefaultView(user::LoginStatus status) OVERRIDE { 96 virtual views::View* CreateDefaultView(user::LoginStatus status,
97 int bubble_width) OVERRIDE {
97 default_view_ = new views::View; 98 default_view_ = new views::View;
98 default_view_->SetLayoutManager(new views::FillLayout); 99 default_view_->SetLayoutManager(new views::FillLayout);
99 default_view_->AddChildView(new views::Label(UTF8ToUTF16("Default"))); 100 default_view_->AddChildView(new views::Label(UTF8ToUTF16("Default")));
100 return default_view_; 101 return default_view_;
101 } 102 }
102 103
103 virtual views::View* CreateDetailedView(user::LoginStatus status) OVERRIDE { 104 virtual views::View* CreateDetailedView(user::LoginStatus status) OVERRIDE {
104 detailed_view_ = new views::View; 105 detailed_view_ = new views::View;
105 detailed_view_->SetLayoutManager(new views::FillLayout); 106 detailed_view_->SetLayoutManager(new views::FillLayout);
106 detailed_view_->AddChildView(new views::Label(UTF8ToUTF16("Detailed"))); 107 detailed_view_->AddChildView(new views::Label(UTF8ToUTF16("Detailed")));
(...skipping 865 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

Powered by Google App Engine
This is Rietveld 408576698