| 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_UNITTEST_H_ | 5 #ifndef EXTENSIONS_BROWSER_API_UNITTEST_H_ |
| 6 #define EXTENSIONS_BROWSER_API_UNITTEST_H_ | 6 #define EXTENSIONS_BROWSER_API_UNITTEST_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "base/prefs/testing_pref_service.h" | 12 #include "base/prefs/testing_pref_service.h" |
| 13 #include "extensions/browser/extensions_test.h" | 13 #include "extensions/browser/extensions_test.h" |
| 14 #include "extensions/browser/mock_extension_system.h" | |
| 15 | 14 |
| 16 namespace base { | 15 namespace base { |
| 17 class Value; | 16 class Value; |
| 18 class DictionaryValue; | 17 class DictionaryValue; |
| 19 class ListValue; | 18 class ListValue; |
| 20 } | 19 } |
| 21 | 20 |
| 22 namespace content { | 21 namespace content { |
| 23 class NotificationService; | 22 class NotificationService; |
| 24 class TestBrowserThreadBundle; | 23 class TestBrowserThreadBundle; |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 // Run the function and ignore any result. | 84 // Run the function and ignore any result. |
| 86 void RunFunction(UIThreadExtensionFunction* function, | 85 void RunFunction(UIThreadExtensionFunction* function, |
| 87 const std::string& args); | 86 const std::string& args); |
| 88 | 87 |
| 89 private: | 88 private: |
| 90 scoped_ptr<content::NotificationService> notification_service_; | 89 scoped_ptr<content::NotificationService> notification_service_; |
| 91 | 90 |
| 92 scoped_ptr<content::TestBrowserThreadBundle> thread_bundle_; | 91 scoped_ptr<content::TestBrowserThreadBundle> thread_bundle_; |
| 93 TestingPrefServiceSimple testing_pref_service_; | 92 TestingPrefServiceSimple testing_pref_service_; |
| 94 | 93 |
| 95 MockExtensionSystemFactory<MockExtensionSystem> extension_system_factory_; | |
| 96 | |
| 97 // The WebContents used to associate a RenderViewHost with API function calls, | 94 // The WebContents used to associate a RenderViewHost with API function calls, |
| 98 // or null. | 95 // or null. |
| 99 scoped_ptr<content::WebContents> contents_; | 96 scoped_ptr<content::WebContents> contents_; |
| 100 | 97 |
| 101 // The Extension used when running API function calls. | 98 // The Extension used when running API function calls. |
| 102 scoped_refptr<Extension> extension_; | 99 scoped_refptr<Extension> extension_; |
| 103 }; | 100 }; |
| 104 | 101 |
| 105 } // namespace extensions | 102 } // namespace extensions |
| 106 | 103 |
| 107 #endif // EXTENSIONS_BROWSER_API_UNITTEST_H_ | 104 #endif // EXTENSIONS_BROWSER_API_UNITTEST_H_ |
| OLD | NEW |