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

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: Rebase 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
« no previous file with comments | « apps/apps.gypi ('k') | apps/shortcut_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/common/extensions/extension.h" 10 #include "chrome/common/extensions/extension.h"
10 #include "content/public/browser/notification_observer.h" 11 #include "content/public/browser/notification_observer.h"
11 #include "content/public/browser/notification_registrar.h" 12 #include "content/public/browser/notification_registrar.h"
12 13
13 class Profile; 14 class Profile;
14 15
15 namespace extensions { 16 namespace apps {
16 17
17 // This class manages the installation of shortcuts for platform apps. 18 // This class manages the installation of shortcuts for platform apps.
18 class AppShortcutManager : public content::NotificationObserver { 19 class ShortcutManager : public ProfileKeyedService,
20 public content::NotificationObserver {
19 public: 21 public:
20 explicit AppShortcutManager(Profile* profile); 22 explicit ShortcutManager(Profile* profile);
21 23
22 virtual ~AppShortcutManager(); 24 virtual ~ShortcutManager();
23 25
24 // content::NotificationObserver 26 // content::NotificationObserver
25 virtual void Observe(int type, 27 virtual void Observe(int type,
26 const content::NotificationSource& source, 28 const content::NotificationSource& source,
27 const content::NotificationDetails& details) OVERRIDE; 29 const content::NotificationDetails& details) OVERRIDE;
28 30
29 private: 31 private:
30 void DeleteApplicationShortcuts(const Extension* extension); 32 void DeleteApplicationShortcuts(const extensions::Extension* extension);
31 33
32 content::NotificationRegistrar registrar_; 34 content::NotificationRegistrar registrar_;
33 Profile* profile_; 35 Profile* profile_;
34 36
35 // Fields used when installing application shortcuts. 37 // Fields used when installing application shortcuts.
36 base::WeakPtrFactory<AppShortcutManager> weak_factory_; 38 base::WeakPtrFactory<ShortcutManager> weak_factory_;
37 39
38 DISALLOW_COPY_AND_ASSIGN(AppShortcutManager); 40 DISALLOW_COPY_AND_ASSIGN(ShortcutManager);
39 }; 41 };
40 42
41 } // namespace extensions 43 } // namespace apps
42 44
43 #endif // CHROME_BROWSER_EXTENSIONS_APP_SHORTCUT_MANAGER_H_ 45 #endif // APPS_SHORTCUT_MANAGER_H_
OLDNEW
« no previous file with comments | « apps/apps.gypi ('k') | apps/shortcut_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698