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 <memory> |
7 #include <utility> | 8 #include <utility> |
8 #include <vector> | 9 #include <vector> |
9 | 10 |
10 #include "ash/display/display_manager.h" | 11 #include "ash/display/display_manager.h" |
11 #include "ash/display/screen_orientation_controller_chromeos.h" | 12 #include "ash/display/screen_orientation_controller_chromeos.h" |
12 #include "ash/display/window_tree_host_manager.h" | 13 #include "ash/display/window_tree_host_manager.h" |
13 #include "ash/shell.h" | 14 #include "ash/shell.h" |
14 #include "ash/system/chromeos/devicetype_utils.h" | 15 #include "ash/system/chromeos/devicetype_utils.h" |
15 #include "ash/system/system_notifier.h" | 16 #include "ash/system/system_notifier.h" |
16 #include "ash/system/tray/actionable_view.h" | 17 #include "ash/system/tray/actionable_view.h" |
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
390 | 391 |
391 // Don't display notifications for accelerometer triggered screen rotations. | 392 // Don't display notifications for accelerometer triggered screen rotations. |
392 // See http://crbug.com/364949 | 393 // See http://crbug.com/364949 |
393 if (Shell::GetInstance() | 394 if (Shell::GetInstance() |
394 ->screen_orientation_controller() | 395 ->screen_orientation_controller() |
395 ->ignore_display_configuration_updates()) { | 396 ->ignore_display_configuration_updates()) { |
396 return; | 397 return; |
397 } | 398 } |
398 | 399 |
399 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); | 400 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); |
400 scoped_ptr<Notification> notification(new Notification( | 401 std::unique_ptr<Notification> notification(new Notification( |
401 message_center::NOTIFICATION_TYPE_SIMPLE, kNotificationId, message, | 402 message_center::NOTIFICATION_TYPE_SIMPLE, kNotificationId, message, |
402 additional_message, bundle.GetImageNamed(IDR_AURA_NOTIFICATION_DISPLAY), | 403 additional_message, bundle.GetImageNamed(IDR_AURA_NOTIFICATION_DISPLAY), |
403 base::string16(), // display_source | 404 base::string16(), // display_source |
404 GURL(), | 405 GURL(), |
405 message_center::NotifierId(message_center::NotifierId::SYSTEM_COMPONENT, | 406 message_center::NotifierId(message_center::NotifierId::SYSTEM_COMPONENT, |
406 system_notifier::kNotifierDisplay), | 407 system_notifier::kNotifierDisplay), |
407 message_center::RichNotificationData(), | 408 message_center::RichNotificationData(), |
408 new message_center::HandleNotificationClickedDelegate( | 409 new message_center::HandleNotificationClickedDelegate( |
409 base::Bind(&OpenSettings)))); | 410 base::Bind(&OpenSettings)))); |
410 | 411 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
450 bool TrayDisplay::GetAccessibleStateForTesting(ui::AXViewState* state) { | 451 bool TrayDisplay::GetAccessibleStateForTesting(ui::AXViewState* state) { |
451 views::View* view = default_; | 452 views::View* view = default_; |
452 if (view) { | 453 if (view) { |
453 view->GetAccessibleState(state); | 454 view->GetAccessibleState(state); |
454 return true; | 455 return true; |
455 } | 456 } |
456 return false; | 457 return false; |
457 } | 458 } |
458 | 459 |
459 } // namespace ash | 460 } // namespace ash |
OLD | NEW |