Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2355)

Unified Diff: chrome/browser/notifications/application_notifier_source.h

Issue 2064363002: Refactor MessageCenterSettingsController. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix misspell. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/notifications/application_notifier_source.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/notifications/application_notifier_source.h
diff --git a/chrome/browser/notifications/application_notifier_source.h b/chrome/browser/notifications/application_notifier_source.h
new file mode 100644
index 0000000000000000000000000000000000000000..a3604ba45ac2af79a448a4a802ada807f8365b57
--- /dev/null
+++ b/chrome/browser/notifications/application_notifier_source.h
@@ -0,0 +1,37 @@
+// Copyright (c) 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_NOTIFICATIONS_APPLICATION_NOTIFIER_SOURCE_H_
+#define CHROME_BROWSER_NOTIFICATIONS_APPLICATION_NOTIFIER_SOURCE_H_
+
+#include "chrome/browser/extensions/extension_app_icon_loader.h"
+#include "chrome/browser/notifications/notifier_source.h"
+
+class ApplicationNotifierSource : public NotifierSource,
+ public AppIconLoaderDelegate {
+ public:
+ explicit ApplicationNotifierSource(Observer* observer);
+ ~ApplicationNotifierSource() override;
+
+ std::vector<std::unique_ptr<message_center::Notifier>> GetNotifierList(
+ Profile* profile) override;
+
+ void SetNotifierEnabled(Profile* profile,
+ const message_center::Notifier& notifier,
+ bool enabled) override;
+
+ message_center::NotifierId::NotifierType GetNotifierType() override;
+
+ private:
+ // Overridden from AppIconLoaderDelegate.
+ void OnAppImageUpdated(const std::string& id,
+ const gfx::ImageSkia& image) override;
+
+ std::unique_ptr<AppIconLoader> app_icon_loader_;
+
+ // Lifetime of parent must be longer than the source.
+ Observer* observer_;
+};
+
+#endif // CHROME_BROWSER_NOTIFICATIONS_APPLICATION_NOTIFIER_SOURCE_H_
« no previous file with comments | « no previous file | chrome/browser/notifications/application_notifier_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698