blob: e7f7b2069878b6e1bc3fa64e206ddc29471a07b9 [file] [log] [blame]
Evan Staded6d837f2017-09-29 02:51:021// 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_EXTENSION_NOTIFIER_CONTROLLER_H_
6#define CHROME_BROWSER_NOTIFICATIONS_EXTENSION_NOTIFIER_CONTROLLER_H_
7
8#include "chrome/browser/notifications/notifier_controller.h"
9#include "chrome/browser/ui/app_icon_loader_delegate.h"
10
11class AppIconLoader;
12
13// Controls extensions and apps. Each extension gets its own row in the settings
14// ui.
15class ExtensionNotifierController : public NotifierController,
16 public AppIconLoaderDelegate {
17 public:
18 explicit ExtensionNotifierController(Observer* observer);
19 ~ExtensionNotifierController() override;
20
Evan Stadefeec2d112017-10-19 03:24:5321 // NotifierController:
Evan Stadeecfc48c2019-06-17 21:35:2322 std::vector<ash::NotifierMetadata> GetNotifierList(Profile* profile) override;
Evan Staded6d837f2017-09-29 02:51:0223 void SetNotifierEnabled(Profile* profile,
24 const message_center::NotifierId& notifier_id,
25 bool enabled) override;
Evan Staded6d837f2017-09-29 02:51:0226
27 private:
28 // Overridden from AppIconLoaderDelegate.
29 void OnAppImageUpdated(const std::string& id,
30 const gfx::ImageSkia& image) override;
31
32 std::unique_ptr<AppIconLoader> app_icon_loader_;
33
34 // Lifetime of parent must be longer than the source.
35 Observer* observer_;
36};
37
38#endif // CHROME_BROWSER_NOTIFICATIONS_EXTENSION_NOTIFIER_CONTROLLER_H_