Avoid a const cast in BubbleFrameView::GetWindowBoundsForClientBounds.
commite17dcdbf5161f30dc45dcf5b1aeac5b154b2959c
authormgiuca <mgiuca@chromium.org>
Tue, 4 Aug 2015 02:06:43 +0000 (3 19:06 -0700)
committerCommit bot <commit-bot@chromium.org>
Tue, 4 Aug 2015 02:07:26 +0000 (4 02:07 +0000)
tree7b1078bdb187308963b816a4f516607b4e2a71bd
parent93906afd35bf9de7ed25b174d490716b730a6044
Avoid a const cast in BubbleFrameView::GetWindowBoundsForClientBounds.

The previous implementation called a const-casted GetUpdatedWindowBounds
with adjust_if_offscreen=false (so it would not have any side-effect). I
found this hard to reason about; it's simpler to just inline the method
(doing away with almost all of the code) and avoid the const_cast.

TBR=mukai@chromium.org

Review URL: https://codereview.chromium.org/1148633003

Cr-Commit-Position: refs/heads/master@{#341668}
chrome/browser/ui/views/autofill/info_bubble.cc
ui/chromeos/ime/mode_indicator_view.cc
ui/views/bubble/bubble_frame_view.cc
ui/views/bubble/bubble_frame_view.h
ui/views/bubble/bubble_frame_view_unittest.cc