| OLD | NEW |
| (Empty) | |
| 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_NOTIFICATIONS_APPLICATION_NOTIFIER_SOURCE_H_ |
| 6 #define CHROME_BROWSER_NOTIFICATIONS_APPLICATION_NOTIFIER_SOURCE_H_ |
| 7 |
| 8 #include "chrome/browser/extensions/extension_app_icon_loader.h" |
| 9 #include "chrome/browser/notifications/notifier_source.h" |
| 10 |
| 11 class ApplicationNotifierSource : public NotifierSource, |
| 12 public AppIconLoaderDelegate { |
| 13 public: |
| 14 explicit ApplicationNotifierSource(Observer* observer); |
| 15 ~ApplicationNotifierSource() override; |
| 16 |
| 17 std::vector<std::unique_ptr<message_center::Notifier>> GetNotifierList( |
| 18 Profile* profile) override; |
| 19 |
| 20 void SetNotifierEnabled(Profile* profile, |
| 21 const message_center::Notifier& notifier, |
| 22 bool enabled) override; |
| 23 |
| 24 message_center::NotifierId::NotifierType GetNotifierType() override; |
| 25 |
| 26 private: |
| 27 // Overridden from AppIconLoaderDelegate. |
| 28 void OnAppImageUpdated(const std::string& id, |
| 29 const gfx::ImageSkia& image) override; |
| 30 |
| 31 std::unique_ptr<AppIconLoader> app_icon_loader_; |
| 32 |
| 33 // Lifetime of parent must be longer than the source. |
| 34 Observer* observer_; |
| 35 }; |
| 36 |
| 37 #endif // CHROME_BROWSER_NOTIFICATIONS_APPLICATION_NOTIFIER_SOURCE_H_ |
| OLD | NEW |