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

Unified Diff: ash/system/tray/special_popup_row.cc

Issue 1270623002: Replace 'Scanning' text in Network Status Area with throbber (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix tooltips Created 5 years, 5 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/system/tray/special_popup_row.h ('k') | chromeos/dbus/fake_shill_manager_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/tray/special_popup_row.cc
diff --git a/ash/system/tray/special_popup_row.cc b/ash/system/tray/special_popup_row.cc
index 186db4e0ba50eabacc1da7f60ca4c675bb2df825..2338aa0f1c2042d056eb069fd72f5bc93715cd08 100644
--- a/ash/system/tray/special_popup_row.cc
+++ b/ash/system/tray/special_popup_row.cc
@@ -82,26 +82,24 @@ void SpecialPopupRow::SetContent(views::View* view) {
AddChildViewAt(content_, 0);
}
-void SpecialPopupRow::AddButton(TrayPopupHeaderButton* button) {
+void SpecialPopupRow::AddView(views::View* view, bool add_separator) {
if (!button_container_) {
button_container_ = CreatePopupHeaderButtonsContainer();
AddChildView(button_container_);
}
- views::Separator* separator =
- new views::Separator(views::Separator::VERTICAL);
- separator->SetColor(ash::kBorderDarkColor);
- separator->SetBorder(
- views::Border::CreateEmptyBorder(kSeparatorInset, 0, kSeparatorInset, 0));
- button_container_->AddChildView(separator);
- button_container_->AddChildView(button);
+ if (add_separator) {
+ views::Separator* separator =
+ new views::Separator(views::Separator::VERTICAL);
+ separator->SetColor(ash::kBorderDarkColor);
+ separator->SetBorder(views::Border::CreateEmptyBorder(kSeparatorInset, 0,
+ kSeparatorInset, 0));
+ button_container_->AddChildView(separator);
+ }
+ button_container_->AddChildView(view);
}
-void SpecialPopupRow::AddThrobber(ThrobberView* throbber) {
- if (!button_container_) {
- button_container_ = CreatePopupHeaderButtonsContainer();
- AddChildView(button_container_);
- }
- button_container_->AddChildView(throbber);
+void SpecialPopupRow::AddButton(TrayPopupHeaderButton* button) {
+ AddView(button, true /* add_separator */);
}
gfx::Size SpecialPopupRow::GetPreferredSize() const {
« no previous file with comments | « ash/system/tray/special_popup_row.h ('k') | chromeos/dbus/fake_shill_manager_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698