diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-15 00:53:43 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-15 00:53:43 +0000 |
commit | bb515eda39129537a089a062c3db3152e63f24d9 (patch) | |
tree | 70e3e3efc6c8f83394e056dd77a832fe9cd4dea4 /chrome | |
parent | 140842a9b3410cba8b48a3f933b2d9779f413cd5 (diff) | |
download | chromium_src-bb515eda39129537a089a062c3db3152e63f24d9.zip chromium_src-bb515eda39129537a089a062c3db3152e63f24d9.tar.gz chromium_src-bb515eda39129537a089a062c3db3152e63f24d9.tar.bz2 |
Constify the params of a couple View functions, which I'll need for an upcoming change to be able to call these from someone else's const member function.
Also fixes a couple cases of wrong parameter wrapping/"*" binding.
Review URL: http://codereview.chromium.org/18251
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8057 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/views/view.cc | 18 | ||||
-rw-r--r-- | chrome/views/view.h | 12 |
2 files changed, 20 insertions, 10 deletions
diff --git a/chrome/views/view.cc b/chrome/views/view.cc index 07061b3..7ace91d 100644 --- a/chrome/views/view.cc +++ b/chrome/views/view.cc @@ -668,11 +668,15 @@ void View::GetHitTestMask(gfx::Path* mask) const { DCHECK(mask); } -void View::ViewHierarchyChanged(bool is_add, View *parent, View *child) { +void View::ViewHierarchyChanged(bool is_add, + View* parent, + View* child) { } void View::ViewHierarchyChangedImpl(bool register_accelerators, - bool is_add, View *parent, View *child) { + bool is_add, + View* parent, + View* child) { if (register_accelerators) { if (is_add) { // If you get this registration, you are part of a subtree that has been @@ -1253,18 +1257,22 @@ bool View::EnumerateFloatingViewsForInterval(int low_bound, int high_bound, } // static -void View::ConvertPointToView(View* src, View* dst, gfx::Point* point) { +void View::ConvertPointToView(const View* src, + const View* dst, + gfx::Point* point) { ConvertPointToView(src, dst, point, true); } // static -void View::ConvertPointToView(View* src, View* dst, gfx::Point* point, +void View::ConvertPointToView(const View* src, + const View* dst, + gfx::Point* point, bool try_other_direction) { // src can be NULL DCHECK(dst); DCHECK(point); - View* v; + const View* v; gfx::Point offset; for (v = dst; v && v != src; v = v->GetParent()) { diff --git a/chrome/views/view.h b/chrome/views/view.h index a3ecc68..f7d9906 100644 --- a/chrome/views/view.h +++ b/chrome/views/view.h @@ -675,8 +675,8 @@ class View : public AcceleratorTarget { // If source and dst are not in the same View hierarchy, the result is // undefined. // Source can be NULL in which case it means the screen coordinate system - static void ConvertPointToView(View* src, - View* dst, + static void ConvertPointToView(const View* src, + const View* dst, gfx::Point* point); // Convert a point from the coordinate system of a View to that of the @@ -1173,13 +1173,15 @@ class View : public AcceleratorTarget { // Takes care of registering/unregistering accelerators if // |register_accelerators| true and calls ViewHierarchyChanged(). void ViewHierarchyChangedImpl(bool register_accelerators, - bool is_add, View *parent, View *child); + bool is_add, + View* parent, + View* child); // This is the actual implementation for ConvertPointToView() // Attempts a parent -> child conversion and then a // child -> parent conversion if try_other_direction is true - static void ConvertPointToView(View* src, - View *dst, + static void ConvertPointToView(const View* src, + const View* dst, gfx::Point* point, bool try_other_direction); |