| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_AUTOCOMPLETE_SHORTCUTS_EXTENSIONS_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_AUTOCOMPLETE_SHORTCUTS_EXTENSIONS_MANAGER_H_ |
| 6 #define CHROME_BROWSER_AUTOCOMPLETE_SHORTCUTS_EXTENSIONS_MANAGER_H_ | 6 #define CHROME_BROWSER_AUTOCOMPLETE_SHORTCUTS_EXTENSIONS_MANAGER_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" |
| 8 #include "base/supports_user_data.h" | 9 #include "base/supports_user_data.h" |
| 9 #include "content/public/browser/notification_observer.h" | 10 #include "content/public/browser/notification_observer.h" |
| 10 #include "content/public/browser/notification_registrar.h" | 11 #include "content/public/browser/notification_registrar.h" |
| 11 | 12 |
| 12 class Profile; | 13 class Profile; |
| 13 | 14 |
| 14 // This class manages the removal of shortcuts associated with an extension when | 15 // This class manages the removal of shortcuts associated with an extension when |
| 15 // that extension is unloaded. | 16 // that extension is unloaded. |
| 16 class ShortcutsExtensionsManager : public base::SupportsUserData::Data, | 17 class ShortcutsExtensionsManager : public base::SupportsUserData::Data, |
| 17 public content::NotificationObserver { | 18 public content::NotificationObserver { |
| 18 public: | 19 public: |
| 19 explicit ShortcutsExtensionsManager(Profile* profile); | 20 explicit ShortcutsExtensionsManager(Profile* profile); |
| 20 ~ShortcutsExtensionsManager() override; | 21 ~ShortcutsExtensionsManager() override; |
| 21 | 22 |
| 22 private: | 23 private: |
| 23 // content::NotificationObserver: | 24 // content::NotificationObserver: |
| 24 void Observe(int type, | 25 void Observe(int type, |
| 25 const content::NotificationSource& source, | 26 const content::NotificationSource& source, |
| 26 const content::NotificationDetails& details) override; | 27 const content::NotificationDetails& details) override; |
| 27 | 28 |
| 28 Profile* profile_; | 29 Profile* profile_; |
| 29 content::NotificationRegistrar notification_registrar_; | 30 content::NotificationRegistrar notification_registrar_; |
| 30 | 31 |
| 31 DISALLOW_COPY_AND_ASSIGN(ShortcutsExtensionsManager); | 32 DISALLOW_COPY_AND_ASSIGN(ShortcutsExtensionsManager); |
| 32 }; | 33 }; |
| 33 | 34 |
| 34 #endif // CHROME_BROWSER_AUTOCOMPLETE_SHORTCUTS_EXTENSIONS_MANAGER_H_ | 35 #endif // CHROME_BROWSER_AUTOCOMPLETE_SHORTCUTS_EXTENSIONS_MANAGER_H_ |
| OLD | NEW |