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