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

Unified Diff: trunk/src/mojo/shell/shell_test_helper.h

Issue 304593002: Revert 272983 "Change Shell / ShellClient to ServiceProvider" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: 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
« no previous file with comments | « trunk/src/mojo/shell/run.cc ('k') | trunk/src/mojo/shell/shell_test_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/mojo/shell/shell_test_helper.h
===================================================================
--- trunk/src/mojo/shell/shell_test_helper.h (revision 272983)
+++ trunk/src/mojo/shell/shell_test_helper.h (working copy)
@@ -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/service_provider/service_provider.mojom.h"
+#include "mojo/public/interfaces/shell/shell.mojom.h"
namespace base {
class MessageLoopProxy;
@@ -20,10 +20,9 @@
namespace mojo {
namespace 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.
+// 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.
class ShellTestHelper {
public:
struct State;
@@ -33,19 +32,18 @@
void Init();
- // Returns a handle to the ServiceProvider. ShellTestHelper owns the
- // ServiceProvider.
- ServiceProvider* service_provider() { return service_provider_.get(); }
+ // Returns a handle to the Shell. ShellTestHelper owns the shell.
+ Shell* shell() { return shell_.get(); }
private:
- class TestServiceProvider;
+ class TestShellClient;
// Invoked once connection has been established.
- void OnServiceProviderStarted();
+ void OnShellStarted();
Environment environment_;
- base::Thread service_provider_thread_;
+ base::Thread shell_thread_;
// If non-null we're in Init() and waiting for connection.
scoped_ptr<base::RunLoop> run_loop_;
@@ -54,9 +52,9 @@
State* state_;
// Client interface for the shell.
- scoped_ptr<TestServiceProvider> local_service_provider_;
+ scoped_ptr<TestShellClient> shell_client_;
- ServiceProviderPtr service_provider_;
+ ShellPtr shell_;
DISALLOW_COPY_AND_ASSIGN(ShellTestHelper);
};
« no previous file with comments | « trunk/src/mojo/shell/run.cc ('k') | trunk/src/mojo/shell/shell_test_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698