| 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/system/drive/tray_drive.h" | 5 #include "ash/system/drive/tray_drive.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "ash/metrics/user_metrics_recorder.h" | 9 #include "ash/metrics/user_metrics_recorder.h" |
| 10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
| (...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 351 // Close the details if there is really nothing to show there anymore. | 351 // Close the details if there is really nothing to show there anymore. |
| 352 if (new_set.empty() && GetWidget()) | 352 if (new_set.empty() && GetWidget()) |
| 353 GetWidget()->Close(); | 353 GetWidget()->Close(); |
| 354 } | 354 } |
| 355 | 355 |
| 356 void AppendSettings() { | 356 void AppendSettings() { |
| 357 if (settings_) | 357 if (settings_) |
| 358 return; | 358 return; |
| 359 | 359 |
| 360 HoverHighlightView* container = new HoverHighlightView(this); | 360 HoverHighlightView* container = new HoverHighlightView(this); |
| 361 container->AddLabel(ui::ResourceBundle::GetSharedInstance(). | 361 container->AddLabel( |
| 362 GetLocalizedString(IDS_ASH_STATUS_TRAY_DRIVE_SETTINGS), | 362 ui::ResourceBundle::GetSharedInstance().GetLocalizedString( |
| 363 IDS_ASH_STATUS_TRAY_DRIVE_SETTINGS), |
| 364 gfx::ALIGN_LEFT, |
| 363 gfx::Font::NORMAL); | 365 gfx::Font::NORMAL); |
| 364 AddChildView(container); | 366 AddChildView(container); |
| 365 settings_ = container; | 367 settings_ = container; |
| 366 } | 368 } |
| 367 | 369 |
| 368 // Overridden from ViewClickListener. | 370 // Overridden from ViewClickListener. |
| 369 virtual void OnViewClicked(views::View* sender) OVERRIDE { | 371 virtual void OnViewClicked(views::View* sender) OVERRIDE { |
| 370 SystemTrayDelegate* delegate = Shell::GetInstance()->system_tray_delegate(); | 372 SystemTrayDelegate* delegate = Shell::GetInstance()->system_tray_delegate(); |
| 371 if (sender == footer()->content()) { | 373 if (sender == footer()->content()) { |
| 372 TransitionToDefaultView(); | 374 TransitionToDefaultView(); |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 510 | 512 |
| 511 tray_view()->SetVisible(false); | 513 tray_view()->SetVisible(false); |
| 512 if (default_) | 514 if (default_) |
| 513 default_->Update(&empty_list); | 515 default_->Update(&empty_list); |
| 514 if (detailed_) | 516 if (detailed_) |
| 515 detailed_->Update(&empty_list); | 517 detailed_->Update(&empty_list); |
| 516 } | 518 } |
| 517 | 519 |
| 518 } // namespace internal | 520 } // namespace internal |
| 519 } // namespace ash | 521 } // namespace ash |
| OLD | NEW |