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

Unified Diff: ui/views/view_unittest.cc

Issue 7104042: ui/views: Fix the signature of View::OnViewAdded/Removed overridden methods. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sky,peter review Created 9 years, 6 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 | « no previous file | ui/views/widget/root_view.h » ('j') | 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 202b2238ff1fc57a9d76d1c4948eb698b57c0aac..ebdc7171f004f5b4aa1d8b43eb00a6efec84d5df 100644
--- a/ui/views/view_unittest.cc
+++ b/ui/views/view_unittest.cc
@@ -4,6 +4,7 @@
#include <algorithm>
+#include "base/compiler_specific.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/gfx/canvas.h"
#include "ui/views/view.h"
@@ -69,15 +70,15 @@ class ObserverView : public View {
}
// Overridden from View:
- virtual void OnViewAdded(View* parent, View* child) {
- subject_view_ = child;
+ virtual void OnViewAdded(const View& parent, const View& child) OVERRIDE {
view_added_ = true;
view_removed_ = false;
+ subject_view_ = &child;
}
- virtual void OnViewRemoved(View* parent, View* child) {
- subject_view_ = child;
- view_removed_ = true;
+ virtual void OnViewRemoved(const View& parent, const View& child) OVERRIDE {
view_added_ = false;
+ view_removed_ = true;
+ subject_view_ = &child;
}
bool view_added() const { return view_added_; }
« no previous file with comments | « no previous file | ui/views/widget/root_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698