| 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_TEST_EXTENSION_REGISTRY_OBSERVER_H_ | 5 #ifndef EXTENSIONS_BROWSER_TEST_EXTENSION_REGISTRY_OBSERVER_H_ |
| 6 #define EXTENSIONS_BROWSER_TEST_EXTENSION_REGISTRY_OBSERVER_H_ | 6 #define EXTENSIONS_BROWSER_TEST_EXTENSION_REGISTRY_OBSERVER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 const Extension* WaitForExtensionLoaded(); | 31 const Extension* WaitForExtensionLoaded(); |
| 32 const Extension* WaitForExtensionUnloaded(); | 32 const Extension* WaitForExtensionUnloaded(); |
| 33 | 33 |
| 34 private: | 34 private: |
| 35 class Waiter; | 35 class Waiter; |
| 36 | 36 |
| 37 // ExtensionRegistryObserver. | 37 // ExtensionRegistryObserver. |
| 38 void OnExtensionWillBeInstalled(content::BrowserContext* browser_context, | 38 void OnExtensionWillBeInstalled(content::BrowserContext* browser_context, |
| 39 const Extension* extension, | 39 const Extension* extension, |
| 40 bool is_update, | 40 bool is_update, |
| 41 bool from_ephemeral, | |
| 42 const std::string& old_name) override; | 41 const std::string& old_name) override; |
| 43 void OnExtensionUninstalled(content::BrowserContext* browser_context, | 42 void OnExtensionUninstalled(content::BrowserContext* browser_context, |
| 44 const Extension* extension, | 43 const Extension* extension, |
| 45 extensions::UninstallReason reason) override; | 44 extensions::UninstallReason reason) override; |
| 46 void OnExtensionLoaded(content::BrowserContext* browser_context, | 45 void OnExtensionLoaded(content::BrowserContext* browser_context, |
| 47 const Extension* extension) override; | 46 const Extension* extension) override; |
| 48 void OnExtensionUnloaded(content::BrowserContext* browser_context, | 47 void OnExtensionUnloaded(content::BrowserContext* browser_context, |
| 49 const Extension* extension, | 48 const Extension* extension, |
| 50 UnloadedExtensionInfo::Reason reason) override; | 49 UnloadedExtensionInfo::Reason reason) override; |
| 51 | 50 |
| 52 const Extension* Wait(scoped_ptr<Waiter>* waiter); | 51 const Extension* Wait(scoped_ptr<Waiter>* waiter); |
| 53 | 52 |
| 54 scoped_ptr<Waiter> will_be_installed_waiter_; | 53 scoped_ptr<Waiter> will_be_installed_waiter_; |
| 55 scoped_ptr<Waiter> uninstalled_waiter_; | 54 scoped_ptr<Waiter> uninstalled_waiter_; |
| 56 scoped_ptr<Waiter> loaded_waiter_; | 55 scoped_ptr<Waiter> loaded_waiter_; |
| 57 scoped_ptr<Waiter> unloaded_waiter_; | 56 scoped_ptr<Waiter> unloaded_waiter_; |
| 58 | 57 |
| 59 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver> | 58 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver> |
| 60 extension_registry_observer_; | 59 extension_registry_observer_; |
| 61 | 60 |
| 62 std::string extension_id_; | 61 std::string extension_id_; |
| 63 | 62 |
| 64 DISALLOW_COPY_AND_ASSIGN(TestExtensionRegistryObserver); | 63 DISALLOW_COPY_AND_ASSIGN(TestExtensionRegistryObserver); |
| 65 }; | 64 }; |
| 66 | 65 |
| 67 } // namespace extensions | 66 } // namespace extensions |
| 68 | 67 |
| 69 #endif // EXTENSIONS_BROWSER_TEST_EXTENSION_REGISTRY_OBSERVER_H_ | 68 #endif // EXTENSIONS_BROWSER_TEST_EXTENSION_REGISTRY_OBSERVER_H_ |
| OLD | NEW |