| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2009 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. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_LOADER_H_ | |
| 6 #define CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_LOADER_H_ | |
| 7 | |
| 8 #include "chrome/common/notification_observer.h" | |
| 9 #include "chrome/common/notification_registrar.h" | |
| 10 | |
| 11 class Extension; | |
| 12 class FilePath; | |
| 13 class Profile; | |
| 14 | |
| 15 class TestExtensionLoader : public NotificationObserver { | |
| 16 public: | |
| 17 explicit TestExtensionLoader(Profile* profile); | |
| 18 | |
| 19 // Tells the extension service to load the extension at the given path. It | |
| 20 // waits for the extension with the expected ID to load, then returns a | |
| 21 // handle to it. | |
| 22 Extension* Load(const char* extension_id, const FilePath& path); | |
| 23 | |
| 24 // Same as above, but installs from a CRX first. | |
| 25 Extension* Install(const char* extension_id, const FilePath& path); | |
| 26 | |
| 27 virtual void Observe(NotificationType type, | |
| 28 const NotificationSource& source, | |
| 29 const NotificationDetails& details); | |
| 30 | |
| 31 private: | |
| 32 Profile* profile_; | |
| 33 Extension* extension_; | |
| 34 NotificationRegistrar registrar_; | |
| 35 std::string loading_extension_id_; | |
| 36 | |
| 37 DISALLOW_COPY_AND_ASSIGN(TestExtensionLoader); | |
| 38 }; | |
| 39 | |
| 40 #endif // CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_LOADER_H_ | |
| OLD | NEW |