| 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" |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 public: | 72 public: |
| 73 explicit PeripheralBatteryNotificationDelegate(const std::string& id) | 73 explicit PeripheralBatteryNotificationDelegate(const std::string& id) |
| 74 : id_(id) {} | 74 : id_(id) {} |
| 75 | 75 |
| 76 // Overridden from NotificationDelegate: | 76 // Overridden from NotificationDelegate: |
| 77 virtual void Display() OVERRIDE {} | 77 virtual void Display() OVERRIDE {} |
| 78 virtual void Error() OVERRIDE {} | 78 virtual void Error() OVERRIDE {} |
| 79 virtual void Close(bool by_user) OVERRIDE {} | 79 virtual void Close(bool by_user) OVERRIDE {} |
| 80 virtual void Click() OVERRIDE {} | 80 virtual void Click() OVERRIDE {} |
| 81 virtual std::string id() const OVERRIDE { return id_; } | 81 virtual std::string id() const OVERRIDE { return id_; } |
| 82 // A NULL return value prevents loading image from URL. It is OK since our | |
| 83 // implementation loads image from system resource bundle. | |
| 84 virtual content::WebContents* GetWebContents() const OVERRIDE { | |
| 85 return NULL; | |
| 86 } | |
| 87 | 82 |
| 88 private: | 83 private: |
| 89 virtual ~PeripheralBatteryNotificationDelegate() {} | 84 virtual ~PeripheralBatteryNotificationDelegate() {} |
| 90 | 85 |
| 91 const std::string id_; | 86 const std::string id_; |
| 92 | 87 |
| 93 DISALLOW_COPY_AND_ASSIGN(PeripheralBatteryNotificationDelegate); | 88 DISALLOW_COPY_AND_ASSIGN(PeripheralBatteryNotificationDelegate); |
| 94 }; | 89 }; |
| 95 | 90 |
| 96 } // namespace | 91 } // namespace |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 ProfileManager::GetPrimaryUserProfile()); | 231 ProfileManager::GetPrimaryUserProfile()); |
| 237 | 232 |
| 238 return true; | 233 return true; |
| 239 } | 234 } |
| 240 | 235 |
| 241 void PeripheralBatteryObserver::CancelNotification(const std::string& address) { | 236 void PeripheralBatteryObserver::CancelNotification(const std::string& address) { |
| 242 g_browser_process->notification_ui_manager()->CancelById(address); | 237 g_browser_process->notification_ui_manager()->CancelById(address); |
| 243 } | 238 } |
| 244 | 239 |
| 245 } // namespace chromeos | 240 } // namespace chromeos |
| OLD | NEW |