Chromium Code Reviews| Index: chrome/browser/ui/extensions/extension_installed_notification.h |
| diff --git a/chrome/browser/ui/extensions/extension_installed_notification.h b/chrome/browser/ui/extensions/extension_installed_notification.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..3b1912937b960b736f4a29f94a5dfe8e90f9f246 |
| --- /dev/null |
| +++ b/chrome/browser/ui/extensions/extension_installed_notification.h |
| @@ -0,0 +1,37 @@ |
| +// Copyright 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_UI_EXTENSIONS_EXTENSION_INSTALLED_NOTIFICATION_H_ |
| +#define CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_INSTALLED_NOTIFICATION_H_ |
| + |
| +#include <string> |
| + |
| +#include "base/memory/ref_counted.h" |
| +#include "chrome/browser/notifications/notification_delegate.h" |
| +#include "chrome/browser/profiles/profile.h" |
| +#include "extensions/common/extension.h" |
| + |
| +class ExtensionInstalledNotification : public NotificationDelegate { |
| + public: |
| + static void Show(const extensions::Extension* extension, Profile* profile); |
| + |
| + ExtensionInstalledNotification(const extensions::Extension* extension, |
| + Profile* profile); |
| + |
| + // NotificationDelegate override: |
| + void Click() override; |
| + std::string id() const override; |
| + |
| + protected: |
| + // This class is ref-counted. |
| + ~ExtensionInstalledNotification() override; |
| + |
| + private: |
| + scoped_refptr<const extensions::Extension> extension_; |
|
benwells
2016/05/20 00:17:29
I think holding on to a refptr to extension is a b
yoshiki
2016/05/24 16:25:18
Thank you for guidance. Done.
|
| + Profile* profile_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(ExtensionInstalledNotification); |
| +}; |
| + |
| +#endif // CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_INSTALLED_NOTIFICATION_H_ |