summaryrefslogtreecommitdiffstats
path: root/chrome/browser/find_in_page_view.cc
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-16 18:17:47 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-16 18:17:47 +0000
commit80f8b9f5cf620c37e9d1408a114dc90699584d89 (patch)
tree9e2f5fcacbb18cd86690bc47e0d22ea8f10ac317 /chrome/browser/find_in_page_view.cc
parentf377cebc8bb25bb9f6708adbfda567a95c296642 (diff)
downloadchromium_src-80f8b9f5cf620c37e9d1408a114dc90699584d89.zip
chromium_src-80f8b9f5cf620c37e9d1408a114dc90699584d89.tar.gz
chromium_src-80f8b9f5cf620c37e9d1408a114dc90699584d89.tar.bz2
Make View::SetBounds take a const gfx::Rect& instead of a const CRect&
Make View::DidChangeBounds call Layout by default, eliminating this function from most places. http://crbug.com/2186 Review URL: http://codereview.chromium.org/7429 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3471 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/find_in_page_view.cc')
-rw-r--r--chrome/browser/find_in_page_view.cc16
1 files changed, 5 insertions, 11 deletions
diff --git a/chrome/browser/find_in_page_view.cc b/chrome/browser/find_in_page_view.cc
index da14afe..2c3aa19 100644
--- a/chrome/browser/find_in_page_view.cc
+++ b/chrome/browser/find_in_page_view.cc
@@ -244,8 +244,7 @@ void FindInPageView::Paint(ChromeCanvas* canvas) {
SkPaint paint;
// Get the local bounds so that we now how much to stretch the background.
- CRect lb;
- GetLocalBounds(&lb, true);
+ gfx::Rect lb = GetLocalBounds(true);
// First, we draw the background image for the whole dialog (3 images: left,
// middle and right). Note, that the window region has been set by the
@@ -270,13 +269,13 @@ void FindInPageView::Paint(ChromeCanvas* canvas) {
canvas->TileImageInt(*bg_middle,
bg_left->width(),
0,
- lb.Width() -
+ lb.width() -
bg_left->width() -
bg_right->width(),
bg_middle->height());
canvas->TileImageInt(*bg_right,
- lb.right - bg_right->width(),
+ lb.right() - bg_right->width(),
0,
bg_right->width(),
bg_right->height());
@@ -322,12 +321,12 @@ void FindInPageView::Paint(ChromeCanvas* canvas) {
// While animating we draw the curved edges at the point where the
// controller told us the top of the window is: |animation_offset_|.
canvas->TileImageInt(*bg_left,
- lb.TopLeft().x,
+ lb.x(),
animation_offset_,
bg_left->width(),
kAnimatingEdgeHeight);
canvas->TileImageInt(*bg_right,
- lb.BottomRight().x - bg_right->width(),
+ lb.right() - bg_right->width(),
animation_offset_,
bg_right->width(),
kAnimatingEdgeHeight);
@@ -399,11 +398,6 @@ void FindInPageView::Layout() {
find_previous_button_->height());
}
-void FindInPageView::DidChangeBounds(const CRect& old_bounds,
- const CRect& new_bounds) {
- Layout();
-}
-
void FindInPageView::ViewHierarchyChanged(bool is_add,
View *parent,
View *child) {