OLD | NEW |
| (Empty) |
1 // Copyright (c) 2012 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_EXTENSIONS_APP_SHORTCUT_MANAGER_H_ | |
6 #define CHROME_BROWSER_EXTENSIONS_APP_SHORTCUT_MANAGER_H_ | |
7 | |
8 #include "base/memory/weak_ptr.h" | |
9 #include "chrome/common/extensions/extension.h" | |
10 #include "content/public/browser/notification_observer.h" | |
11 #include "content/public/browser/notification_registrar.h" | |
12 | |
13 class Profile; | |
14 | |
15 namespace extensions { | |
16 | |
17 // This class manages the installation of shortcuts for platform apps. | |
18 class AppShortcutManager : public content::NotificationObserver { | |
19 public: | |
20 explicit AppShortcutManager(Profile* profile); | |
21 | |
22 virtual ~AppShortcutManager(); | |
23 | |
24 // content::NotificationObserver | |
25 virtual void Observe(int type, | |
26 const content::NotificationSource& source, | |
27 const content::NotificationDetails& details) OVERRIDE; | |
28 | |
29 private: | |
30 void DeleteApplicationShortcuts(const Extension* extension); | |
31 | |
32 content::NotificationRegistrar registrar_; | |
33 Profile* profile_; | |
34 | |
35 // Fields used when installing application shortcuts. | |
36 base::WeakPtrFactory<AppShortcutManager> weak_factory_; | |
37 | |
38 DISALLOW_COPY_AND_ASSIGN(AppShortcutManager); | |
39 }; | |
40 | |
41 } // namespace extensions | |
42 | |
43 #endif // CHROME_BROWSER_EXTENSIONS_APP_SHORTCUT_MANAGER_H_ | |
OLD | NEW |