| 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/chromeos/tray_display.h" | 5 #include "ash/system/chromeos/tray_display.h" |
| 6 | 6 |
| 7 #include <utility> |
| 7 #include <vector> | 8 #include <vector> |
| 8 | 9 |
| 9 #include "ash/display/display_manager.h" | 10 #include "ash/display/display_manager.h" |
| 10 #include "ash/display/screen_orientation_controller_chromeos.h" | 11 #include "ash/display/screen_orientation_controller_chromeos.h" |
| 11 #include "ash/display/window_tree_host_manager.h" | 12 #include "ash/display/window_tree_host_manager.h" |
| 12 #include "ash/shell.h" | 13 #include "ash/shell.h" |
| 13 #include "ash/system/chromeos/devicetype_utils.h" | 14 #include "ash/system/chromeos/devicetype_utils.h" |
| 14 #include "ash/system/system_notifier.h" | 15 #include "ash/system/system_notifier.h" |
| 15 #include "ash/system/tray/actionable_view.h" | 16 #include "ash/system/tray/actionable_view.h" |
| 16 #include "ash/system/tray/fixed_sized_image_view.h" | 17 #include "ash/system/tray/fixed_sized_image_view.h" |
| (...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 message_center::NOTIFICATION_TYPE_SIMPLE, kNotificationId, message, | 395 message_center::NOTIFICATION_TYPE_SIMPLE, kNotificationId, message, |
| 395 additional_message, bundle.GetImageNamed(IDR_AURA_NOTIFICATION_DISPLAY), | 396 additional_message, bundle.GetImageNamed(IDR_AURA_NOTIFICATION_DISPLAY), |
| 396 base::string16(), // display_source | 397 base::string16(), // display_source |
| 397 GURL(), | 398 GURL(), |
| 398 message_center::NotifierId(message_center::NotifierId::SYSTEM_COMPONENT, | 399 message_center::NotifierId(message_center::NotifierId::SYSTEM_COMPONENT, |
| 399 system_notifier::kNotifierDisplay), | 400 system_notifier::kNotifierDisplay), |
| 400 message_center::RichNotificationData(), | 401 message_center::RichNotificationData(), |
| 401 new message_center::HandleNotificationClickedDelegate( | 402 new message_center::HandleNotificationClickedDelegate( |
| 402 base::Bind(&OpenSettings)))); | 403 base::Bind(&OpenSettings)))); |
| 403 | 404 |
| 404 message_center::MessageCenter::Get()->AddNotification(notification.Pass()); | 405 message_center::MessageCenter::Get()->AddNotification( |
| 406 std::move(notification)); |
| 405 } | 407 } |
| 406 | 408 |
| 407 views::View* TrayDisplay::CreateDefaultView(user::LoginStatus status) { | 409 views::View* TrayDisplay::CreateDefaultView(user::LoginStatus status) { |
| 408 DCHECK(default_ == NULL); | 410 DCHECK(default_ == NULL); |
| 409 default_ = new DisplayView(); | 411 default_ = new DisplayView(); |
| 410 return default_; | 412 return default_; |
| 411 } | 413 } |
| 412 | 414 |
| 413 void TrayDisplay::DestroyDefaultView() { | 415 void TrayDisplay::DestroyDefaultView() { |
| 414 default_ = NULL; | 416 default_ = NULL; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 442 bool TrayDisplay::GetAccessibleStateForTesting(ui::AXViewState* state) { | 444 bool TrayDisplay::GetAccessibleStateForTesting(ui::AXViewState* state) { |
| 443 views::View* view = default_; | 445 views::View* view = default_; |
| 444 if (view) { | 446 if (view) { |
| 445 view->GetAccessibleState(state); | 447 view->GetAccessibleState(state); |
| 446 return true; | 448 return true; |
| 447 } | 449 } |
| 448 return false; | 450 return false; |
| 449 } | 451 } |
| 450 | 452 |
| 451 } // namespace ash | 453 } // namespace ash |
| OLD | NEW |