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/at_exit.h" | 8 #include "base/at_exit.h" |
9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 tracker_.OnNodeReordered(node_id, relative_node_id, direction); | 318 tracker_.OnNodeReordered(node_id, relative_node_id, direction); |
319 } | 319 } |
320 virtual void OnViewDeleted(Id node) OVERRIDE { | 320 virtual void OnViewDeleted(Id node) OVERRIDE { |
321 tracker_.OnNodeDeleted(node); | 321 tracker_.OnNodeDeleted(node); |
322 } | 322 } |
323 virtual void OnViewInputEvent(Id node_id, | 323 virtual void OnViewInputEvent(Id node_id, |
324 EventPtr event, | 324 EventPtr event, |
325 const Callback<void()>& callback) OVERRIDE { | 325 const Callback<void()>& callback) OVERRIDE { |
326 tracker_.OnNodeInputEvent(node_id, event.Pass()); | 326 tracker_.OnNodeInputEvent(node_id, event.Pass()); |
327 } | 327 } |
328 virtual void OnFocusChanged(Id gained_focus_id, | |
329 Id lost_focus_id) OVERRIDE {} | |
330 virtual void Embed( | 328 virtual void Embed( |
331 const String& url, | 329 const String& url, |
332 InterfaceRequest<ServiceProvider> service_provider) OVERRIDE { | 330 InterfaceRequest<ServiceProvider> service_provider) OVERRIDE { |
333 tracker_.DelegateEmbed(url); | 331 tracker_.DelegateEmbed(url); |
334 } | 332 } |
335 virtual void DispatchOnViewInputEvent(Id node_id, | 333 virtual void DispatchOnViewInputEvent(mojo::EventPtr event) OVERRIDE { |
336 mojo::EventPtr event) OVERRIDE { | |
337 } | 334 } |
338 | 335 |
339 private: | 336 private: |
340 TestChangeTracker tracker_; | 337 TestChangeTracker tracker_; |
341 ViewManagerProxy connection_; | 338 ViewManagerProxy connection_; |
342 | 339 |
343 DISALLOW_COPY_AND_ASSIGN(TestViewManagerClientConnection); | 340 DISALLOW_COPY_AND_ASSIGN(TestViewManagerClientConnection); |
344 }; | 341 }; |
345 | 342 |
346 // Used with ViewManagerService::Embed(). Creates a | 343 // Used with ViewManagerService::Embed(). Creates a |
(...skipping 930 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1277 } | 1274 } |
1278 } | 1275 } |
1279 | 1276 |
1280 // TODO(sky): add coverage of test that destroys connections and ensures other | 1277 // TODO(sky): add coverage of test that destroys connections and ensures other |
1281 // connections get deletion notification. | 1278 // connections get deletion notification. |
1282 | 1279 |
1283 // TODO(sky): need to better track changes to initial connection. For example, | 1280 // TODO(sky): need to better track changes to initial connection. For example, |
1284 // that SetBounsdNodes/AddNode and the like don't result in messages to the | 1281 // that SetBounsdNodes/AddNode and the like don't result in messages to the |
1285 // originating connection. | 1282 // originating connection. |
1286 | 1283 |
1287 // TODO(beng): Add tests for focus: | |
1288 // - focus between two nodes known to a connection | |
1289 // - focus between nodes unknown to one of the connections. | |
1290 // - focus between nodes unknown to either connection. | |
1291 | |
1292 } // namespace service | 1284 } // namespace service |
1293 } // namespace mojo | 1285 } // namespace mojo |
OLD | NEW |