| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/power/peripheral_battery_observer.h" | 5 #include "chrome/browser/chromeos/power/peripheral_battery_observer.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 GURL(kNotificationOriginUrl), | 219 GURL(kNotificationOriginUrl), |
| 220 ui::ResourceBundle::GetSharedInstance().GetImageNamed( | 220 ui::ResourceBundle::GetSharedInstance().GetImageNamed( |
| 221 IDR_NOTIFICATION_PERIPHERAL_BATTERY_LOW), | 221 IDR_NOTIFICATION_PERIPHERAL_BATTERY_LOW), |
| 222 UTF8ToUTF16(battery.name), | 222 UTF8ToUTF16(battery.name), |
| 223 string_text, | 223 string_text, |
| 224 blink::WebTextDirectionDefault, | 224 blink::WebTextDirectionDefault, |
| 225 base::string16(), | 225 base::string16(), |
| 226 UTF8ToUTF16(address), | 226 UTF8ToUTF16(address), |
| 227 new PeripheralBatteryNotificationDelegate(address)); | 227 new PeripheralBatteryNotificationDelegate(address)); |
| 228 | 228 |
| 229 notification_manager->Add(notification, | 229 notification_manager->Add( |
| 230 ProfileManager::GetDefaultProfileOrOffTheRecord()); | 230 notification, |
| 231 ProfileManager::GetPrimaryUserProfileOrOffTheRecord()); |
| 231 | 232 |
| 232 return true; | 233 return true; |
| 233 } | 234 } |
| 234 | 235 |
| 235 void PeripheralBatteryObserver::CancelNotification(const std::string& address) { | 236 void PeripheralBatteryObserver::CancelNotification(const std::string& address) { |
| 236 g_browser_process->notification_ui_manager()->CancelById(address); | 237 g_browser_process->notification_ui_manager()->CancelById(address); |
| 237 } | 238 } |
| 238 | 239 |
| 239 } // namespace chromeos | 240 } // namespace chromeos |
| OLD | NEW |