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 "ash/strings/grit/ash_strings.h" | 10 #include "ash/strings/grit/ash_strings.h" |
11 #include "base/bind.h" | 11 #include "base/bind.h" |
| 12 #include "base/macros.h" |
12 #include "base/strings/string16.h" | 13 #include "base/strings/string16.h" |
13 #include "base/strings/string_split.h" | 14 #include "base/strings/string_split.h" |
14 #include "base/strings/string_util.h" | 15 #include "base/strings/string_util.h" |
15 #include "base/strings/stringprintf.h" | 16 #include "base/strings/stringprintf.h" |
16 #include "base/strings/utf_string_conversions.h" | 17 #include "base/strings/utf_string_conversions.h" |
17 #include "chrome/browser/browser_process.h" | 18 #include "chrome/browser/browser_process.h" |
18 #include "chrome/browser/notifications/notification.h" | 19 #include "chrome/browser/notifications/notification.h" |
19 #include "chrome/browser/notifications/notification_ui_manager.h" | 20 #include "chrome/browser/notifications/notification_ui_manager.h" |
20 #include "chrome/browser/profiles/profile_manager.h" | 21 #include "chrome/browser/profiles/profile_manager.h" |
21 #include "chrome/grit/theme_resources.h" | 22 #include "chrome/grit/theme_resources.h" |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 | 230 |
230 void PeripheralBatteryObserver::CancelNotification(const std::string& address) { | 231 void PeripheralBatteryObserver::CancelNotification(const std::string& address) { |
231 // If last_used_profile_ is NULL then no notification has been posted yet. | 232 // If last_used_profile_ is NULL then no notification has been posted yet. |
232 if (notification_profile_) { | 233 if (notification_profile_) { |
233 g_browser_process->notification_ui_manager()->CancelById( | 234 g_browser_process->notification_ui_manager()->CancelById( |
234 address, NotificationUIManager::GetProfileID(notification_profile_)); | 235 address, NotificationUIManager::GetProfileID(notification_profile_)); |
235 } | 236 } |
236 } | 237 } |
237 | 238 |
238 } // namespace chromeos | 239 } // namespace chromeos |
OLD | NEW |