diff options
-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); |