| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "chrome/browser/chromeos/first_run/drive_first_run_controller.h" | 5 #include "chrome/browser/chromeos/first_run/drive_first_run_controller.h" |
| 6 | 6 |
| 7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
| 8 #include "ash/system/tray/system_tray_delegate.h" | 8 #include "ash/system/tray/system_tray_delegate.h" |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 456 const extensions::Extension* extension = | 456 const extensions::Extension* extension = |
| 457 service->GetExtensionById(drive_hosted_app_id_, false); | 457 service->GetExtensionById(drive_hosted_app_id_, false); |
| 458 DCHECK(extension); | 458 DCHECK(extension); |
| 459 | 459 |
| 460 message_center::RichNotificationData data; | 460 message_center::RichNotificationData data; |
| 461 data.buttons.push_back(message_center::ButtonInfo( | 461 data.buttons.push_back(message_center::ButtonInfo( |
| 462 l10n_util::GetStringUTF16(IDS_DRIVE_OFFLINE_NOTIFICATION_BUTTON))); | 462 l10n_util::GetStringUTF16(IDS_DRIVE_OFFLINE_NOTIFICATION_BUTTON))); |
| 463 ui::ResourceBundle& resource_bundle = ui::ResourceBundle::GetSharedInstance(); | 463 ui::ResourceBundle& resource_bundle = ui::ResourceBundle::GetSharedInstance(); |
| 464 scoped_ptr<message_center::Notification> notification( | 464 scoped_ptr<message_center::Notification> notification( |
| 465 new message_center::Notification( | 465 new message_center::Notification( |
| 466 message_center::NOTIFICATION_TYPE_SIMPLE, | 466 message_center::NOTIFICATION_TYPE_SIMPLE, kDriveOfflineNotificationId, |
| 467 kDriveOfflineNotificationId, | 467 base::string16(), // title |
| 468 base::string16(), // title | |
| 469 l10n_util::GetStringUTF16(IDS_DRIVE_OFFLINE_NOTIFICATION_MESSAGE), | 468 l10n_util::GetStringUTF16(IDS_DRIVE_OFFLINE_NOTIFICATION_MESSAGE), |
| 470 resource_bundle.GetImageNamed(IDR_NOTIFICATION_DRIVE), | 469 resource_bundle.GetImageNamed(IDR_NOTIFICATION_DRIVE), |
| 471 base::UTF8ToUTF16(extension->name()), | 470 base::UTF8ToUTF16(extension->name()), GURL(), |
| 472 message_center::NotifierId(message_center::NotifierId::APPLICATION, | 471 message_center::NotifierId(message_center::NotifierId::APPLICATION, |
| 473 kDriveHostedAppId), | 472 kDriveHostedAppId), |
| 474 data, | 473 data, new DriveOfflineNotificationDelegate(profile_))); |
| 475 new DriveOfflineNotificationDelegate(profile_))); | |
| 476 notification->set_priority(message_center::LOW_PRIORITY); | 474 notification->set_priority(message_center::LOW_PRIORITY); |
| 477 message_center::MessageCenter::Get()->AddNotification(notification.Pass()); | 475 message_center::MessageCenter::Get()->AddNotification(notification.Pass()); |
| 478 } | 476 } |
| 479 | 477 |
| 480 } // namespace chromeos | 478 } // namespace chromeos |
| OLD | NEW |