Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1290)

Unified Diff: mojo/shell/shell_test_helper.h

Issue 298653010: Change Shell / ShellClient to ServiceProvider (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Support content Mojo stuff Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: mojo/shell/shell_test_helper.h
diff --git a/mojo/shell/shell_test_helper.h b/mojo/shell/shell_test_helper.h
index 5d0df6ea5b86d77ae576a236988995796aab498b..ab495cb1645fc44a4a338cdd3eb7cb42fecb5e32 100644
--- a/mojo/shell/shell_test_helper.h
+++ b/mojo/shell/shell_test_helper.h
@@ -10,7 +10,7 @@
#include "base/run_loop.h"
#include "base/threading/thread.h"
#include "mojo/public/cpp/environment/environment.h"
-#include "mojo/public/interfaces/shell/shell.mojom.h"
+#include "mojo/public/interfaces/service_provider/service_provider.mojom.h"
namespace base {
class MessageLoopProxy;
@@ -20,9 +20,10 @@ class RunLoop;
namespace mojo {
namespace shell {
-// ShellTestHelper is useful for tests to establish a connection to the Shell.
-// ShellTestHelper does this by spawning a thread and connecting. Invoke Init()
-// to do this. Once done, shell() returns the handle to the Shell.
+// ShellTestHelper is useful for tests to establish a connection to the
+// ServiceProvider. ShellTestHelper does this by spawning a thread and
+// connecting. Invoke Init() to do this. Once done, service_provider()
+// returns the handle to the ServiceProvider.
class ShellTestHelper {
public:
struct State;
@@ -32,18 +33,19 @@ class ShellTestHelper {
void Init();
- // Returns a handle to the Shell. ShellTestHelper owns the shell.
- Shell* shell() { return shell_.get(); }
+ // Returns a handle to the ServiceProvider. ShellTestHelper owns the
+ // ServiceProvider.
+ ServiceProvider* service_provider() { return service_provider_.get(); }
private:
- class TestShellClient;
+ class TestServiceProvider;
// Invoked once connection has been established.
- void OnShellStarted();
+ void OnServiceProviderStarted();
Environment environment_;
- base::Thread shell_thread_;
+ base::Thread service_provider_thread_;
// If non-null we're in Init() and waiting for connection.
scoped_ptr<base::RunLoop> run_loop_;
@@ -52,9 +54,9 @@ class ShellTestHelper {
State* state_;
// Client interface for the shell.
- scoped_ptr<TestShellClient> shell_client_;
+ scoped_ptr<TestServiceProvider> local_service_provider_;
- ShellPtr shell_;
+ ServiceProviderPtr service_provider_;
DISALLOW_COPY_AND_ASSIGN(ShellTestHelper);
};

Powered by Google App Engine
This is Rietveld 408576698