1 // Copyright 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_UI_EXTENSIONS_EXTENSION_INSTALLED_NOTIFICATION_H_
6 #define CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_INSTALLED_NOTIFICATION_H_
7 
8 #include <string>
9 
10 #include "chrome/browser/profiles/profile.h"
11 #include "extensions/common/extension.h"
12 #include "ui/message_center/public/cpp/notification_delegate.h"
13 
14 class ExtensionInstalledNotification
15     : public message_center::NotificationDelegate {
16  public:
17   static void Show(const extensions::Extension* extension, Profile* profile);
18 
19   ExtensionInstalledNotification(const extensions::Extension* extension,
20                                  Profile* profile);
21 
22   // NotificationDelegate override:
23   void Click(const base::Optional<int>& button_index,
24              const base::Optional<base::string16>& reply) override;
25 
26  protected:
27   // This class is ref-counted.
28   ~ExtensionInstalledNotification() override;
29 
30  private:
31   const std::string extension_id_;
32   Profile* const profile_;
33 
34   DISALLOW_COPY_AND_ASSIGN(ExtensionInstalledNotification);
35 };
36 
37 #endif  // CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_INSTALLED_NOTIFICATION_H_
38