| OLD | NEW |
| 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 CHROME_BROWSER_EXTENSIONS_APP_SHORTCUT_MANAGER_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_APP_SHORTCUT_MANAGER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_APP_SHORTCUT_MANAGER_H_ |
| 7 | 7 |
| 8 #include "base/memory/weak_ptr.h" |
| 8 #include "chrome/browser/extensions/image_loading_tracker.h" | 9 #include "chrome/browser/extensions/image_loading_tracker.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 extensions { |
| 17 | 18 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 29 const std::string& extension_id, | 30 const std::string& extension_id, |
| 30 int index) OVERRIDE; | 31 int index) OVERRIDE; |
| 31 | 32 |
| 32 // content::NotificationObserver | 33 // content::NotificationObserver |
| 33 virtual void Observe(int type, | 34 virtual void Observe(int type, |
| 34 const content::NotificationSource& source, | 35 const content::NotificationSource& source, |
| 35 const content::NotificationDetails& details) OVERRIDE; | 36 const content::NotificationDetails& details) OVERRIDE; |
| 36 | 37 |
| 37 private: | 38 private: |
| 38 void UpdateApplicationShortcuts(const Extension* extension); | 39 void UpdateApplicationShortcuts(const Extension* extension); |
| 40 |
| 41 #if defined(OS_WIN) |
| 42 void OnAppHostInstallationComplete(const Extension* extension, |
| 43 bool app_host_install_success); |
| 44 #endif |
| 45 |
| 39 void DeleteApplicationShortcuts(const Extension* extension); | 46 void DeleteApplicationShortcuts(const Extension* extension); |
| 40 | 47 |
| 41 content::NotificationRegistrar registrar_; | 48 content::NotificationRegistrar registrar_; |
| 42 Profile* profile_; | 49 Profile* profile_; |
| 43 | 50 |
| 44 // Fields used when installing application shortcuts. | 51 // Fields used when installing application shortcuts. |
| 45 ShellIntegration::ShortcutInfo shortcut_info_; | 52 ShellIntegration::ShortcutInfo shortcut_info_; |
| 46 ImageLoadingTracker tracker_; | 53 ImageLoadingTracker tracker_; |
| 47 | 54 |
| 55 base::WeakPtrFactory<AppShortcutManager> weak_factory_; |
| 56 |
| 48 DISALLOW_COPY_AND_ASSIGN(AppShortcutManager); | 57 DISALLOW_COPY_AND_ASSIGN(AppShortcutManager); |
| 49 }; | 58 }; |
| 50 | 59 |
| 51 } // namespace extensions | 60 } // namespace extensions |
| 52 | 61 |
| 53 #endif // CHROME_BROWSER_EXTENSIONS_APP_SHORTCUT_MANAGER_H_ | 62 #endif // CHROME_BROWSER_EXTENSIONS_APP_SHORTCUT_MANAGER_H_ |
| OLD | NEW |