| 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 #include <string> | 5 #include <string> |
| 6 #include <vector> | 6 #include <vector> |
| 7 | 7 |
| 8 #include "base/auto_reset.h" | 8 #include "base/auto_reset.h" |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 310 tracker_.OnNodeDeleted(node, server_change_id); | 310 tracker_.OnNodeDeleted(node, server_change_id); |
| 311 } | 311 } |
| 312 virtual void OnViewDeleted(TransportViewId view) OVERRIDE { | 312 virtual void OnViewDeleted(TransportViewId view) OVERRIDE { |
| 313 tracker_.OnViewDeleted(view); | 313 tracker_.OnViewDeleted(view); |
| 314 } | 314 } |
| 315 virtual void OnNodeViewReplaced(TransportNodeId node, | 315 virtual void OnNodeViewReplaced(TransportNodeId node, |
| 316 TransportViewId new_view_id, | 316 TransportViewId new_view_id, |
| 317 TransportViewId old_view_id) OVERRIDE { | 317 TransportViewId old_view_id) OVERRIDE { |
| 318 tracker_.OnNodeViewReplaced(node, new_view_id, old_view_id); | 318 tracker_.OnNodeViewReplaced(node, new_view_id, old_view_id); |
| 319 } | 319 } |
| 320 virtual void OnViewInputEvent(TransportViewId view_id, |
| 321 EventPtr event, |
| 322 const Callback<void()>& callback) OVERRIDE { |
| 323 tracker_.OnViewInputEvent(view_id, event.Pass()); |
| 324 } |
| 320 | 325 |
| 321 private: | 326 private: |
| 322 TestChangeTracker tracker_; | 327 TestChangeTracker tracker_; |
| 323 ViewManagerProxy connection_; | 328 ViewManagerProxy connection_; |
| 324 | 329 |
| 325 DISALLOW_COPY_AND_ASSIGN(TestViewManagerClientConnection); | 330 DISALLOW_COPY_AND_ASSIGN(TestViewManagerClientConnection); |
| 326 }; | 331 }; |
| 327 | 332 |
| 328 // Used with IViewManager::Connect(). Creates a TestViewManagerClientConnection, | 333 // Used with IViewManager::Connect(). Creates a TestViewManagerClientConnection, |
| 329 // which creates and owns the ViewManagerProxy. | 334 // which creates and owns the ViewManagerProxy. |
| (...skipping 870 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1200 // TODO(sky): add coverage of test that destroys connections and ensures other | 1205 // TODO(sky): add coverage of test that destroys connections and ensures other |
| 1201 // connections get deletion notification (or advanced server id). | 1206 // connections get deletion notification (or advanced server id). |
| 1202 | 1207 |
| 1203 // TODO(sky): need to better track changes to initial connection. For example, | 1208 // TODO(sky): need to better track changes to initial connection. For example, |
| 1204 // that SetBounsdNodes/AddNode and the like don't result in messages to the | 1209 // that SetBounsdNodes/AddNode and the like don't result in messages to the |
| 1205 // originating connection. | 1210 // originating connection. |
| 1206 | 1211 |
| 1207 } // namespace service | 1212 } // namespace service |
| 1208 } // namespace view_manager | 1213 } // namespace view_manager |
| 1209 } // namespace mojo | 1214 } // namespace mojo |
| OLD | NEW |