| Index: mojo/services/view_manager/view_manager_connection_unittest.cc
|
| diff --git a/mojo/services/view_manager/view_manager_connection_unittest.cc b/mojo/services/view_manager/view_manager_connection_unittest.cc
|
| index abbbc3060634c4c241a33a7dcbff8a45e86b5cba..d656a43984ee068817ad686585e40273e4ad2e58 100644
|
| --- a/mojo/services/view_manager/view_manager_connection_unittest.cc
|
| +++ b/mojo/services/view_manager/view_manager_connection_unittest.cc
|
| @@ -97,7 +97,7 @@ uint32_t CreateViewId(uint16_t connection_id, uint16_t view_id) {
|
|
|
| // Creates a node with the specified id. Returns true on success. Blocks until
|
| // we get back result from server.
|
| -bool CreateNode(ViewManager* view_manager, uint16_t id) {
|
| +bool CreateNode(IViewManager* view_manager, uint16_t id) {
|
| bool result = false;
|
| view_manager->CreateNode(id, base::Bind(&BooleanCallback, &result));
|
| DoRunLoop();
|
| @@ -107,7 +107,7 @@ bool CreateNode(ViewManager* view_manager, uint16_t id) {
|
| // TODO(sky): make a macro for these functions, they are all the same.
|
|
|
| // Deletes a node, blocking until done.
|
| -bool DeleteNode(ViewManager* view_manager,
|
| +bool DeleteNode(IViewManager* view_manager,
|
| uint32_t node_id,
|
| ChangeId change_id) {
|
| bool result = false;
|
| @@ -118,7 +118,7 @@ bool DeleteNode(ViewManager* view_manager,
|
| }
|
|
|
| // Adds a node, blocking until done.
|
| -bool AddNode(ViewManager* view_manager,
|
| +bool AddNode(IViewManager* view_manager,
|
| uint32_t parent,
|
| uint32_t child,
|
| ChangeId change_id) {
|
| @@ -130,7 +130,7 @@ bool AddNode(ViewManager* view_manager,
|
| }
|
|
|
| // Removes a node, blocking until done.
|
| -bool RemoveNodeFromParent(ViewManager* view_manager,
|
| +bool RemoveNodeFromParent(IViewManager* view_manager,
|
| uint32_t node_id,
|
| ChangeId change_id) {
|
| bool result = false;
|
| @@ -140,7 +140,7 @@ bool RemoveNodeFromParent(ViewManager* view_manager,
|
| return result;
|
| }
|
|
|
| -void GetNodeTree(ViewManager* view_manager,
|
| +void GetNodeTree(IViewManager* view_manager,
|
| uint32_t node_id,
|
| std::vector<TestNode>* nodes) {
|
| view_manager->GetNodeTree(node_id, base::Bind(&INodesCallback, nodes));
|
| @@ -149,7 +149,7 @@ void GetNodeTree(ViewManager* view_manager,
|
|
|
| // Creates a view with the specified id. Returns true on success. Blocks until
|
| // we get back result from server.
|
| -bool CreateView(ViewManager* view_manager, uint16_t id) {
|
| +bool CreateView(IViewManager* view_manager, uint16_t id) {
|
| bool result = false;
|
| view_manager->CreateView(id, base::Bind(&BooleanCallback, &result));
|
| DoRunLoop();
|
| @@ -158,7 +158,7 @@ bool CreateView(ViewManager* view_manager, uint16_t id) {
|
|
|
| // Sets a view on the specified node. Returns true on success. Blocks until we
|
| // get back result from server.
|
| -bool SetView(ViewManager* view_manager,
|
| +bool SetView(IViewManager* view_manager,
|
| uint32_t node_id,
|
| uint32_t view_id,
|
| ChangeId change_id) {
|
| @@ -173,7 +173,7 @@ bool SetView(ViewManager* view_manager,
|
|
|
| typedef std::vector<std::string> Changes;
|
|
|
| -class ViewManagerClientImpl : public ViewManagerClient {
|
| +class ViewManagerClientImpl : public IViewManagerClient {
|
| public:
|
| ViewManagerClientImpl() : id_(0), quit_count_(0) {}
|
|
|
| @@ -198,7 +198,7 @@ class ViewManagerClientImpl : public ViewManagerClient {
|
| }
|
|
|
| private:
|
| - // ViewManagerClient overrides:
|
| + // IViewManagerClient overrides:
|
| virtual void OnConnectionEstablished(uint16_t connection_id) OVERRIDE {
|
| id_ = connection_id;
|
| if (current_run_loop)
|
| @@ -253,7 +253,7 @@ class ViewManagerConnectionTest : public testing::Test {
|
|
|
| test_helper_.Init();
|
|
|
| - InterfacePipe<ViewManager, AnyInterface> pipe;
|
| + InterfacePipe<IViewManager, AnyInterface> pipe;
|
| test_helper_.shell()->Connect("mojo:mojo_view_manager",
|
| pipe.handle_to_peer.Pass());
|
| view_manager_.reset(pipe.handle_to_self.Pass(), &client_);
|
| @@ -265,7 +265,7 @@ class ViewManagerConnectionTest : public testing::Test {
|
| // Creates a second connection to the viewmanager.
|
| void EstablishSecondConnection() {
|
| AllocationScope allocation_scope;
|
| - InterfacePipe<ViewManager, AnyInterface> pipe;
|
| + InterfacePipe<IViewManager, AnyInterface> pipe;
|
| test_helper_.shell()->Connect("mojo:mojo_view_manager",
|
| pipe.handle_to_peer.Pass());
|
| view_manager2_.reset(pipe.handle_to_self.Pass(), &client2_);
|
| @@ -281,10 +281,10 @@ class ViewManagerConnectionTest : public testing::Test {
|
| shell::ShellTestHelper test_helper_;
|
|
|
| ViewManagerClientImpl client_;
|
| - RemotePtr<ViewManager> view_manager_;
|
| + RemotePtr<IViewManager> view_manager_;
|
|
|
| ViewManagerClientImpl client2_;
|
| - RemotePtr<ViewManager> view_manager2_;
|
| + RemotePtr<IViewManager> view_manager2_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(ViewManagerConnectionTest);
|
| };
|
|
|