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

Unified Diff: ui/views/view_unittest.cc

Issue 2745163003: Improve doc of ViewObserver and clarify arguments (Closed)
Patch Set: moar Created 3 years, 9 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 | « ui/views/view_observer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/view_unittest.cc
diff --git a/ui/views/view_unittest.cc b/ui/views/view_unittest.cc
index 96cd62abd5e1563e7cbbeb889f24e5990be90452..06f33cb72a38ebccc0b0e7279b969529be174bc6 100644
--- a/ui/views/view_unittest.cc
+++ b/ui/views/view_unittest.cc
@@ -4878,11 +4878,11 @@ class ViewObserverTest : public ViewTest, public ViewObserver {
~ViewObserverTest() override {}
// ViewObserver:
- void OnChildViewAdded(View* child) override {
+ void OnChildViewAdded(View* parent, View* child) override {
Bret 2017/03/14 18:58:36 add a couple lines to the existing unit tests that
sky 2017/03/14 20:19:28 Done.
child_view_added_times_++;
child_view_added_ = child;
}
- void OnChildViewRemoved(View* child, View* parent) override {
+ void OnChildViewRemoved(View* parent, View* child) override {
child_view_removed_times_++;
child_view_removed_ = child;
child_view_removed_parent_ = parent;
@@ -4898,7 +4898,9 @@ class ViewObserverTest : public ViewTest, public ViewObserver {
void OnViewBoundsChanged(View* view) override { view_bounds_changed_ = view; }
- void OnChildViewReordered(View* view) override { view_reordered_ = view; }
+ void OnChildViewReordered(View* parent, View* view) override {
+ view_reordered_ = view;
+ }
void reset() {
child_view_added_times_ = 0;
« no previous file with comments | « ui/views/view_observer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698