Commit e43526b4 authored by yusukes@chromium.org's avatar yusukes@chromium.org

Make Window::ContainsPoint and Window::ContainsPointInRoot const.

BUG=None
TEST=try


Review URL: https://chromiumcodereview.appspot.com/10823015

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148439 0039d316-1c4b-4281-b951-d872f2087c98
parent b404c01d
...@@ -479,8 +479,8 @@ void Window::RemoveObserver(WindowObserver* observer) { ...@@ -479,8 +479,8 @@ void Window::RemoveObserver(WindowObserver* observer) {
observers_.RemoveObserver(observer); observers_.RemoveObserver(observer);
} }
bool Window::ContainsPointInRoot(const gfx::Point& point_in_root) { bool Window::ContainsPointInRoot(const gfx::Point& point_in_root) const {
Window* root_window = GetRootWindow(); const Window* root_window = GetRootWindow();
if (!root_window) if (!root_window)
return false; return false;
gfx::Point local_point(point_in_root); gfx::Point local_point(point_in_root);
...@@ -488,7 +488,7 @@ bool Window::ContainsPointInRoot(const gfx::Point& point_in_root) { ...@@ -488,7 +488,7 @@ bool Window::ContainsPointInRoot(const gfx::Point& point_in_root) {
return gfx::Rect(GetTargetBounds().size()).Contains(local_point); return gfx::Rect(GetTargetBounds().size()).Contains(local_point);
} }
bool Window::ContainsPoint(const gfx::Point& local_point) { bool Window::ContainsPoint(const gfx::Point& local_point) const {
return gfx::Rect(bounds().size()).Contains(local_point); return gfx::Rect(bounds().size()).Contains(local_point);
} }
......
...@@ -259,11 +259,11 @@ class AURA_EXPORT Window : public ui::LayerDelegate, ...@@ -259,11 +259,11 @@ class AURA_EXPORT Window : public ui::LayerDelegate,
// Returns true if the |point_in_root| in root window's coordinate falls // Returns true if the |point_in_root| in root window's coordinate falls
// within this window's bounds. Returns false if the window is detached // within this window's bounds. Returns false if the window is detached
// from root window. // from root window.
bool ContainsPointInRoot(const gfx::Point& point_in_root); bool ContainsPointInRoot(const gfx::Point& point_in_root) const;
// Returns true if relative-to-this-Window's-origin |local_point| falls // Returns true if relative-to-this-Window's-origin |local_point| falls
// within this Window's bounds. // within this Window's bounds.
bool ContainsPoint(const gfx::Point& local_point); bool ContainsPoint(const gfx::Point& local_point) const;
// Returns true if the mouse pointer at relative-to-this-Window's-origin // Returns true if the mouse pointer at relative-to-this-Window's-origin
// |local_point| can trigger an event for this Window. // |local_point| can trigger an event for this Window.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment