| 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_API_RUNTIME_RUNTIME_API_H_ |   5 #ifndef CHROME_BROWSER_EXTENSIONS_API_RUNTIME_RUNTIME_API_H_ | 
|   6 #define CHROME_BROWSER_EXTENSIONS_API_RUNTIME_RUNTIME_API_H_ |   6 #define CHROME_BROWSER_EXTENSIONS_API_RUNTIME_RUNTIME_API_H_ | 
|   7  |   7  | 
|   8 #include "chrome/browser/extensions/extension_function.h" |   8 #include "chrome/browser/extensions/extension_function.h" | 
|   9 #include "content/public/browser/notification_observer.h" |   9 #include "content/public/browser/notification_observer.h" | 
|  10 #include "content/public/browser/notification_registrar.h" |  10 #include "content/public/browser/notification_registrar.h" | 
|  11  |  11  | 
|  12 class Profile; |  12 class Profile; | 
 |  13  | 
 |  14 namespace base { | 
|  13 class Version; |  15 class Version; | 
 |  16 } | 
|  14  |  17  | 
|  15 namespace extensions { |  18 namespace extensions { | 
|  16 class Extension; |  19 class Extension; | 
|  17 class ExtensionHost; |  20 class ExtensionHost; | 
|  18  |  21  | 
|  19 class RuntimeEventRouter { |  22 class RuntimeEventRouter { | 
|  20  public: |  23  public: | 
|  21   // Dispatches the onStartup event to all currently-loaded extensions. |  24   // Dispatches the onStartup event to all currently-loaded extensions. | 
|  22   static void DispatchOnStartupEvent(Profile* profile, |  25   static void DispatchOnStartupEvent(Profile* profile, | 
|  23                                      const std::string& extension_id); |  26                                      const std::string& extension_id); | 
|  24  |  27  | 
|  25   // Dispatches the onInstalled event to the given extension. |  28   // Dispatches the onInstalled event to the given extension. | 
|  26   static void DispatchOnInstalledEvent(Profile* profile, |  29   static void DispatchOnInstalledEvent(Profile* profile, | 
|  27                                        const std::string& extension_id, |  30                                        const std::string& extension_id, | 
|  28                                        const Version& old_version, |  31                                        const base::Version& old_version, | 
|  29                                        bool chrome_updated); |  32                                        bool chrome_updated); | 
|  30  |  33  | 
|  31   // Dispatches the onUpdateAvailable event to the given extension. |  34   // Dispatches the onUpdateAvailable event to the given extension. | 
|  32   static void DispatchOnUpdateAvailableEvent( |  35   static void DispatchOnUpdateAvailableEvent( | 
|  33       Profile* profile, |  36       Profile* profile, | 
|  34       const std::string& extension_id, |  37       const std::string& extension_id, | 
|  35       const base::DictionaryValue* manifest); |  38       const base::DictionaryValue* manifest); | 
|  36  |  39  | 
|  37   // Dispatches the onBrowserUpdateAvailable event to all extensions. |  40   // Dispatches the onBrowserUpdateAvailable event to all extensions. | 
|  38   static void DispatchOnBrowserUpdateAvailableEvent(Profile* profile); |  41   static void DispatchOnBrowserUpdateAvailableEvent(Profile* profile); | 
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  79   void CheckComplete(); |  82   void CheckComplete(); | 
|  80   void ReplyUpdateFound(const std::string& version); |  83   void ReplyUpdateFound(const std::string& version); | 
|  81  |  84  | 
|  82   content::NotificationRegistrar registrar_; |  85   content::NotificationRegistrar registrar_; | 
|  83   bool did_reply_; |  86   bool did_reply_; | 
|  84 }; |  87 }; | 
|  85  |  88  | 
|  86 }  // namespace extensions |  89 }  // namespace extensions | 
|  87  |  90  | 
|  88 #endif  // CHROME_BROWSER_EXTENSIONS_API_RUNTIME_RUNTIME_API_H_ |  91 #endif  // CHROME_BROWSER_EXTENSIONS_API_RUNTIME_RUNTIME_API_H_ | 
| OLD | NEW |