Chromium Code Reviews| 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_TEST_UTILS_H_ | 5 #ifndef EXTENSIONS_BROWSER_API_TEST_UTILS_H_ |
| 6 #define EXTENSIONS_BROWSER_API_TEST_UTILS_H_ | 6 #define EXTENSIONS_BROWSER_API_TEST_UTILS_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 69 UIThreadExtensionFunction* function, | 69 UIThreadExtensionFunction* function, |
| 70 const std::string& args, | 70 const std::string& args, |
| 71 content::BrowserContext* context, | 71 content::BrowserContext* context, |
| 72 std::unique_ptr<ExtensionFunctionDispatcher> dispatcher); | 72 std::unique_ptr<ExtensionFunctionDispatcher> dispatcher); |
| 73 base::Value* RunFunctionWithDelegateAndReturnSingleResult( | 73 base::Value* RunFunctionWithDelegateAndReturnSingleResult( |
| 74 UIThreadExtensionFunction* function, | 74 UIThreadExtensionFunction* function, |
| 75 const std::string& args, | 75 const std::string& args, |
| 76 content::BrowserContext* context, | 76 content::BrowserContext* context, |
| 77 std::unique_ptr<ExtensionFunctionDispatcher> dispatcher, | 77 std::unique_ptr<ExtensionFunctionDispatcher> dispatcher, |
| 78 RunFunctionFlags flags); | 78 RunFunctionFlags flags); |
| 79 base::Value* RunFunctionWithDelegateAndReturnSingleResult( | |
|
jdufault
2016/06/03 23:16:13
Adding this function avoids an unnecessary seriali
| |
| 80 UIThreadExtensionFunction* function, | |
| 81 std::unique_ptr<base::ListValue> args, | |
| 82 content::BrowserContext* context, | |
| 83 std::unique_ptr<ExtensionFunctionDispatcher> dispatcher, | |
| 84 RunFunctionFlags flags); | |
| 79 | 85 |
| 80 // RunFunctionWithDelegateAndReturnSingleResult, except with a NULL | 86 // RunFunctionWithDelegateAndReturnSingleResult, except with a NULL |
| 81 // implementation of the Delegate. | 87 // implementation of the Delegate. |
| 82 base::Value* RunFunctionAndReturnSingleResult( | 88 base::Value* RunFunctionAndReturnSingleResult( |
| 83 UIThreadExtensionFunction* function, | 89 UIThreadExtensionFunction* function, |
| 84 const std::string& args, | 90 const std::string& args, |
| 85 content::BrowserContext* context); | 91 content::BrowserContext* context); |
| 86 base::Value* RunFunctionAndReturnSingleResult( | 92 base::Value* RunFunctionAndReturnSingleResult( |
| 87 UIThreadExtensionFunction* function, | 93 UIThreadExtensionFunction* function, |
| 88 const std::string& args, | 94 const std::string& args, |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 121 bool RunFunction(UIThreadExtensionFunction* function, | 127 bool RunFunction(UIThreadExtensionFunction* function, |
| 122 std::unique_ptr<base::ListValue> args, | 128 std::unique_ptr<base::ListValue> args, |
| 123 content::BrowserContext* context, | 129 content::BrowserContext* context, |
| 124 std::unique_ptr<ExtensionFunctionDispatcher> dispatcher, | 130 std::unique_ptr<ExtensionFunctionDispatcher> dispatcher, |
| 125 RunFunctionFlags flags); | 131 RunFunctionFlags flags); |
| 126 | 132 |
| 127 } // namespace api_test_utils | 133 } // namespace api_test_utils |
| 128 } // namespace extensions | 134 } // namespace extensions |
| 129 | 135 |
| 130 #endif // EXTENSIONS_BROWSER_API_TEST_UTILS_H_ | 136 #endif // EXTENSIONS_BROWSER_API_TEST_UTILS_H_ |
| OLD | NEW |