| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 EXTENSIONS_BROWSER_API_RUNTIME_RUNTIME_API_H_ | 5 #ifndef EXTENSIONS_BROWSER_API_RUNTIME_RUNTIME_API_H_ |
| 6 #define EXTENSIONS_BROWSER_API_RUNTIME_RUNTIME_API_H_ | 6 #define EXTENSIONS_BROWSER_API_RUNTIME_RUNTIME_API_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 void OnBackgroundHostStartup(const Extension* extension) override; | 95 void OnBackgroundHostStartup(const Extension* extension) override; |
| 96 | 96 |
| 97 // Pref related functions that deals with info about installed extensions that | 97 // Pref related functions that deals with info about installed extensions that |
| 98 // has not been loaded yet. | 98 // has not been loaded yet. |
| 99 // Used to send chrome.runtime.onInstalled event upon loading the extensions. | 99 // Used to send chrome.runtime.onInstalled event upon loading the extensions. |
| 100 bool ReadPendingOnInstallInfoFromPref(const ExtensionId& extension_id, | 100 bool ReadPendingOnInstallInfoFromPref(const ExtensionId& extension_id, |
| 101 base::Version* previous_version); | 101 base::Version* previous_version); |
| 102 void RemovePendingOnInstallInfoFromPref(const ExtensionId& extension_id); | 102 void RemovePendingOnInstallInfoFromPref(const ExtensionId& extension_id); |
| 103 void StorePendingOnInstallInfoToPref(const Extension* extension); | 103 void StorePendingOnInstallInfoToPref(const Extension* extension); |
| 104 | 104 |
| 105 scoped_ptr<RuntimeAPIDelegate> delegate_; | 105 std::unique_ptr<RuntimeAPIDelegate> delegate_; |
| 106 | 106 |
| 107 content::BrowserContext* browser_context_; | 107 content::BrowserContext* browser_context_; |
| 108 | 108 |
| 109 // True if we should dispatch the chrome.runtime.onInstalled event with | 109 // True if we should dispatch the chrome.runtime.onInstalled event with |
| 110 // reason "chrome_update" upon loading each extension. | 110 // reason "chrome_update" upon loading each extension. |
| 111 bool dispatch_chrome_updated_event_; | 111 bool dispatch_chrome_updated_event_; |
| 112 | 112 |
| 113 content::NotificationRegistrar registrar_; | 113 content::NotificationRegistrar registrar_; |
| 114 | 114 |
| 115 // Listen to extension notifications. | 115 // Listen to extension notifications. |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 RUNTIME_GETPACKAGEDIRECTORYENTRY) | 237 RUNTIME_GETPACKAGEDIRECTORYENTRY) |
| 238 | 238 |
| 239 protected: | 239 protected: |
| 240 ~RuntimeGetPackageDirectoryEntryFunction() override {} | 240 ~RuntimeGetPackageDirectoryEntryFunction() override {} |
| 241 ResponseAction Run() override; | 241 ResponseAction Run() override; |
| 242 }; | 242 }; |
| 243 | 243 |
| 244 } // namespace extensions | 244 } // namespace extensions |
| 245 | 245 |
| 246 #endif // EXTENSIONS_BROWSER_API_RUNTIME_RUNTIME_API_H_ | 246 #endif // EXTENSIONS_BROWSER_API_RUNTIME_RUNTIME_API_H_ |
| OLD | NEW |