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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/notifications/application_notifier_source.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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_
OLDNEW
« 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