Wrap Pepper CDM Content Settings code in defined(ENABLE_PEPPER_CDMS).
[chromium-blink-merge.git] / apps / shortcut_manager.h
bloba0efb822c183728afce6f717285a99238dccfffa
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.
5 #ifndef APPS_SHORTCUT_MANAGER_H_
6 #define APPS_SHORTCUT_MANAGER_H_
8 #include "base/memory/weak_ptr.h"
9 #include "chrome/common/extensions/extension.h"
10 #include "components/browser_context_keyed_service/browser_context_keyed_service.h"
11 #include "content/public/browser/notification_observer.h"
12 #include "content/public/browser/notification_registrar.h"
14 class Profile;
16 namespace apps {
18 // This class manages the installation of shortcuts for platform apps.
19 class ShortcutManager : public BrowserContextKeyedService,
20 public content::NotificationObserver {
21 public:
22 explicit ShortcutManager(Profile* profile);
24 virtual ~ShortcutManager();
26 // content::NotificationObserver
27 virtual void Observe(int type,
28 const content::NotificationSource& source,
29 const content::NotificationDetails& details) OVERRIDE;
31 private:
32 void DeleteApplicationShortcuts(const extensions::Extension* extension);
34 content::NotificationRegistrar registrar_;
35 Profile* profile_;
37 // Fields used when installing application shortcuts.
38 base::WeakPtrFactory<ShortcutManager> weak_factory_;
40 DISALLOW_COPY_AND_ASSIGN(ShortcutManager);
43 } // namespace apps
45 #endif // APPS_SHORTCUT_MANAGER_H_