Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(187)

Side by Side Diff: apps/shortcut_manager.h

Issue 12378037: Move apps_shortcut_manager into src/apps (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Hmmmm Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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_EXTENSIONS_APP_SHORTCUT_MANAGER_H_ 5 #ifndef APPS_SHORTCUT_MANAGER_H_
6 #define CHROME_BROWSER_EXTENSIONS_APP_SHORTCUT_MANAGER_H_ 6 #define APPS_SHORTCUT_MANAGER_H_
7 7
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "chrome/browser/profiles/profile_keyed_service.h"
9 #include "chrome/browser/shell_integration.h" 10 #include "chrome/browser/shell_integration.h"
10 #include "chrome/common/extensions/extension.h" 11 #include "chrome/common/extensions/extension.h"
11 #include "content/public/browser/notification_observer.h" 12 #include "content/public/browser/notification_observer.h"
12 #include "content/public/browser/notification_registrar.h" 13 #include "content/public/browser/notification_registrar.h"
13 14
14 class Profile; 15 class Profile;
15 16
16 namespace extensions { 17 namespace apps {
17 18
18 // This class manages the installation of shortcuts for platform apps. 19 // This class manages the installation of shortcuts for platform apps.
19 class AppShortcutManager : public content::NotificationObserver { 20 class ShortcutManager : public ProfileKeyedService,
21 public content::NotificationObserver {
20 public: 22 public:
21 explicit AppShortcutManager(Profile* profile); 23 explicit ShortcutManager(Profile* profile);
22 24
23 virtual ~AppShortcutManager(); 25 virtual ~ShortcutManager();
24 26
25 // content::NotificationObserver 27 // content::NotificationObserver
26 virtual void Observe(int type, 28 virtual void Observe(int type,
27 const content::NotificationSource& source, 29 const content::NotificationSource& source,
28 const content::NotificationDetails& details) OVERRIDE; 30 const content::NotificationDetails& details) OVERRIDE;
29 31
30 private: 32 private:
31 void DeleteApplicationShortcuts(const Extension* extension); 33 void DeleteApplicationShortcuts(const extensions::Extension* extension);
32 34
33 content::NotificationRegistrar registrar_; 35 content::NotificationRegistrar registrar_;
34 Profile* profile_; 36 Profile* profile_;
35 37
36 // Fields used when installing application shortcuts. 38 // Fields used when installing application shortcuts.
37 base::WeakPtrFactory<AppShortcutManager> weak_factory_; 39 base::WeakPtrFactory<ShortcutManager> weak_factory_;
38 40
39 DISALLOW_COPY_AND_ASSIGN(AppShortcutManager); 41 DISALLOW_COPY_AND_ASSIGN(ShortcutManager);
40 }; 42 };
41 43
42 } // namespace extensions 44 } // namespace apps
43 45
44 #endif // CHROME_BROWSER_EXTENSIONS_APP_SHORTCUT_MANAGER_H_ 46 #endif // APPS_SHORTCUT_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698