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 "mojo/services/public/cpp/view_manager/node.h" | 5 #include "mojo/services/public/cpp/view_manager/node.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/strings/stringprintf.h" | 8 #include "base/strings/stringprintf.h" |
9 #include "mojo/services/public/cpp/view_manager/lib/node_private.h" | 9 #include "mojo/services/public/cpp/view_manager/lib/node_private.h" |
10 #include "mojo/services/public/cpp/view_manager/node_observer.h" | 10 #include "mojo/services/public/cpp/view_manager/node_observer.h" |
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
342 } | 342 } |
343 | 343 |
344 Changes GetAndClearChanges() { | 344 Changes GetAndClearChanges() { |
345 Changes changes; | 345 Changes changes; |
346 changes_.swap(changes); | 346 changes_.swap(changes); |
347 return changes; | 347 return changes; |
348 } | 348 } |
349 | 349 |
350 private: | 350 private: |
351 // Overridden from NodeObserver: | 351 // Overridden from NodeObserver: |
| 352 virtual void OnNodeReordering(Node* node, |
| 353 Node* relative_node, |
| 354 OrderDirection direction) OVERRIDE { |
| 355 OnNodeReordered(node, relative_node, direction); |
| 356 } |
| 357 |
352 virtual void OnNodeReordered(Node* node, | 358 virtual void OnNodeReordered(Node* node, |
353 Node* relative_node, | 359 Node* relative_node, |
354 OrderDirection direction) OVERRIDE { | 360 OrderDirection direction) OVERRIDE { |
355 Change change; | 361 Change change; |
356 change.node = node; | 362 change.node = node; |
357 change.relative_node = relative_node; | 363 change.relative_node = relative_node; |
358 change.direction = direction; | 364 change.direction = direction; |
359 changes_.push_back(change); | 365 changes_.push_back(change); |
360 } | 366 } |
361 | 367 |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
531 "node=0,1 old_bounds=0,0 0x0 new_bounds=0,0 100x100 phase=changing", | 537 "node=0,1 old_bounds=0,0 0x0 new_bounds=0,0 100x100 phase=changing", |
532 changes[0]); | 538 changes[0]); |
533 EXPECT_EQ( | 539 EXPECT_EQ( |
534 "node=0,1 old_bounds=0,0 0x0 new_bounds=0,0 100x100 phase=changed", | 540 "node=0,1 old_bounds=0,0 0x0 new_bounds=0,0 100x100 phase=changed", |
535 changes[1]); | 541 changes[1]); |
536 } | 542 } |
537 } | 543 } |
538 | 544 |
539 } // namespace view_manager | 545 } // namespace view_manager |
540 } // namespace mojo | 546 } // namespace mojo |
OLD | NEW |