| 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/ime/tray_ime.h" | 5 #include "ash/system/ime/tray_ime.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "ash/root_window_controller.h" |
| 9 #include "ash/shell.h" | 10 #include "ash/shell.h" |
| 10 #include "ash/system/tray/system_tray.h" | 11 #include "ash/system/tray/system_tray.h" |
| 11 #include "ash/system/tray/system_tray_delegate.h" | 12 #include "ash/system/tray/system_tray_delegate.h" |
| 12 #include "ash/system/tray/tray_constants.h" | 13 #include "ash/system/tray/tray_constants.h" |
| 13 #include "ash/system/tray/tray_details_view.h" | 14 #include "ash/system/tray/tray_details_view.h" |
| 14 #include "ash/system/tray/tray_item_more.h" | 15 #include "ash/system/tray/tray_item_more.h" |
| 15 #include "ash/system/tray/tray_item_view.h" | 16 #include "ash/system/tray/tray_item_view.h" |
| 16 #include "ash/system/tray/tray_notification_view.h" | 17 #include "ash/system/tray/tray_notification_view.h" |
| 17 #include "ash/system/tray/tray_views.h" | 18 #include "ash/system/tray/tray_views.h" |
| 18 #include "ash/wm/shelf_layout_manager.h" | 19 #include "ash/wm/shelf_layout_manager.h" |
| (...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 if (default_) | 329 if (default_) |
| 329 default_->UpdateLabel(current); | 330 default_->UpdateLabel(current); |
| 330 if (detailed_) | 331 if (detailed_) |
| 331 detailed_->Update(list, property_list); | 332 detailed_->Update(list, property_list); |
| 332 | 333 |
| 333 if (list.size() > 1 && show_message) { | 334 if (list.size() > 1 && show_message) { |
| 334 // If the notification is still visible, hide it and clear the flag so it is | 335 // If the notification is still visible, hide it and clear the flag so it is |
| 335 // refreshed. | 336 // refreshed. |
| 336 if (notification_) { | 337 if (notification_) { |
| 337 notification_->UpdateLabel(); | 338 notification_->UpdateLabel(); |
| 338 } else if (!Shell::GetInstance()->shelf()->IsVisible() || !message_shown_) { | 339 } else if (!Shell::GetPrimaryRootWindowController()->shelf()->IsVisible() || |
| 340 !message_shown_) { |
| 339 ShowNotificationView(); | 341 ShowNotificationView(); |
| 340 message_shown_ = true; | 342 message_shown_ = true; |
| 341 } | 343 } |
| 342 } | 344 } |
| 343 } | 345 } |
| 344 | 346 |
| 345 } // namespace internal | 347 } // namespace internal |
| 346 } // namespace ash | 348 } // namespace ash |
| OLD | NEW |