| 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 MOJO_SHELL_SHELL_TEST_HELPER_ | 5 #ifndef MOJO_SHELL_SHELL_TEST_HELPER_ |
| 6 #define MOJO_SHELL_SHELL_TEST_HELPER_ | 6 #define MOJO_SHELL_SHELL_TEST_HELPER_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 // Returns a handle to the ServiceManager. ShellTestHelper owns the | 33 // Returns a handle to the ServiceManager. ShellTestHelper owns the |
| 34 // ServiceProvider. | 34 // ServiceProvider. |
| 35 ServiceManager* service_manager() { return context_->service_manager(); } | 35 ServiceManager* service_manager() { return context_->service_manager(); } |
| 36 | 36 |
| 37 // Sets a ServiceLoader for the specified URL. |loader| is ultimately used on | 37 // Sets a ServiceLoader for the specified URL. |loader| is ultimately used on |
| 38 // the thread this class spawns. | 38 // the thread this class spawns. |
| 39 void SetLoaderForURL(scoped_ptr<ServiceLoader> loader, const GURL& url); | 39 void SetLoaderForURL(scoped_ptr<ServiceLoader> loader, const GURL& url); |
| 40 | 40 |
| 41 private: | 41 private: |
| 42 scoped_ptr<Context> context_; | 42 scoped_ptr<Context> context_; |
| 43 base::MessageLoop shell_loop_; |
| 43 scoped_ptr<ServiceManager::TestAPI> test_api_; | 44 scoped_ptr<ServiceManager::TestAPI> test_api_; |
| 44 DISALLOW_COPY_AND_ASSIGN(ShellTestHelper); | 45 DISALLOW_COPY_AND_ASSIGN(ShellTestHelper); |
| 45 }; | 46 }; |
| 46 | 47 |
| 47 } // namespace shell | 48 } // namespace shell |
| 48 } // namespace mojo | 49 } // namespace mojo |
| 49 | 50 |
| 50 #endif // MOJO_SHELL_SHELL_TEST_HELPER_ | 51 #endif // MOJO_SHELL_SHELL_TEST_HELPER_ |
| OLD | NEW |