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 <vector> | 7 #include <vector> |
8 | 8 |
9 #include "ash/content/display/screen_orientation_controller_chromeos.h" | 9 #include "ash/content/display/screen_orientation_controller_chromeos.h" |
10 #include "ash/display/display_manager.h" | 10 #include "ash/display/display_manager.h" |
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
384 // Don't display notifications for accelerometer triggered screen rotations. | 384 // Don't display notifications for accelerometer triggered screen rotations. |
385 // See http://crbug.com/364949 | 385 // See http://crbug.com/364949 |
386 if (Shell::GetInstance() | 386 if (Shell::GetInstance() |
387 ->screen_orientation_controller() | 387 ->screen_orientation_controller() |
388 ->ignore_display_configuration_updates()) { | 388 ->ignore_display_configuration_updates()) { |
389 return; | 389 return; |
390 } | 390 } |
391 | 391 |
392 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); | 392 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); |
393 scoped_ptr<Notification> notification(new Notification( | 393 scoped_ptr<Notification> notification(new Notification( |
394 message_center::NOTIFICATION_TYPE_SIMPLE, | 394 message_center::NOTIFICATION_TYPE_SIMPLE, kNotificationId, message, |
395 kNotificationId, | 395 additional_message, bundle.GetImageNamed(IDR_AURA_NOTIFICATION_DISPLAY), |
396 message, | |
397 additional_message, | |
398 bundle.GetImageNamed(IDR_AURA_NOTIFICATION_DISPLAY), | |
399 base::string16(), // display_source | 396 base::string16(), // display_source |
400 message_center::NotifierId( | 397 GURL(), |
401 message_center::NotifierId::SYSTEM_COMPONENT, | 398 message_center::NotifierId(message_center::NotifierId::SYSTEM_COMPONENT, |
402 system_notifier::kNotifierDisplay), | 399 system_notifier::kNotifierDisplay), |
403 message_center::RichNotificationData(), | 400 message_center::RichNotificationData(), |
404 new message_center::HandleNotificationClickedDelegate( | 401 new message_center::HandleNotificationClickedDelegate( |
405 base::Bind(&OpenSettings)))); | 402 base::Bind(&OpenSettings)))); |
406 | 403 |
407 message_center::MessageCenter::Get()->AddNotification(notification.Pass()); | 404 message_center::MessageCenter::Get()->AddNotification(notification.Pass()); |
408 } | 405 } |
409 | 406 |
410 views::View* TrayDisplay::CreateDefaultView(user::LoginStatus status) { | 407 views::View* TrayDisplay::CreateDefaultView(user::LoginStatus status) { |
411 DCHECK(default_ == NULL); | 408 DCHECK(default_ == NULL); |
412 default_ = new DisplayView(); | 409 default_ = new DisplayView(); |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
445 bool TrayDisplay::GetAccessibleStateForTesting(ui::AXViewState* state) { | 442 bool TrayDisplay::GetAccessibleStateForTesting(ui::AXViewState* state) { |
446 views::View* view = default_; | 443 views::View* view = default_; |
447 if (view) { | 444 if (view) { |
448 view->GetAccessibleState(state); | 445 view->GetAccessibleState(state); |
449 return true; | 446 return true; |
450 } | 447 } |
451 return false; | 448 return false; |
452 } | 449 } |
453 | 450 |
454 } // namespace ash | 451 } // namespace ash |
OLD | NEW |