Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 "base/memory/ref_counted.h" | |
| 11 #include "chrome/browser/notifications/notification_delegate.h" | |
| 12 #include "chrome/browser/profiles/profile.h" | |
| 13 #include "extensions/common/extension.h" | |
| 14 | |
| 15 class ExtensionInstalledNotification : public 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() override; | |
| 24 std::string id() const override; | |
| 25 | |
| 26 protected: | |
| 27 // This class is ref-counted. | |
| 28 ~ExtensionInstalledNotification() override; | |
| 29 | |
| 30 private: | |
| 31 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.
| |
| 32 Profile* profile_; | |
| 33 | |
| 34 DISALLOW_COPY_AND_ASSIGN(ExtensionInstalledNotification); | |
| 35 }; | |
| 36 | |
| 37 #endif // CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_INSTALLED_NOTIFICATION_H_ | |
| OLD | NEW |