summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/frame
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-29 21:53:27 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-29 21:53:27 +0000
commita4c368180132f1f5fc2e57af75115b0d36b542a7 (patch)
tree44069f6a2e8fbec60b3347736941fd1da20c7a00 /chrome/browser/views/frame
parentc3b0173e79820fbb5252d873fc14ea70c1132bcc (diff)
downloadchromium_src-a4c368180132f1f5fc2e57af75115b0d36b542a7.zip
chromium_src-a4c368180132f1f5fc2e57af75115b0d36b542a7.tar.gz
chromium_src-a4c368180132f1f5fc2e57af75115b0d36b542a7.tar.bz2
Fixes a slew of random link/compile errors for views on gtk.
BUG=none TEST=none TBR=ben Review URL: http://codereview.chromium.org/115948 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17246 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/frame')
-rw-r--r--chrome/browser/views/frame/browser_view.cc10
1 files changed, 9 insertions, 1 deletions
diff --git a/chrome/browser/views/frame/browser_view.cc b/chrome/browser/views/frame/browser_view.cc
index d32e8b6..b68b2c1 100644
--- a/chrome/browser/views/frame/browser_view.cc
+++ b/chrome/browser/views/frame/browser_view.cc
@@ -56,7 +56,6 @@
#include "grit/theme_resources.h"
#include "grit/webkit_resources.h"
#include "views/controls/menu/menu.h"
-#include "views/controls/scrollbar/native_scroll_bar.h"
#include "views/fill_layout.h"
#include "views/view.h"
#include "views/widget/root_view.h"
@@ -64,6 +63,10 @@
#include "views/window/non_client_view.h"
#include "views/window/window.h"
+#if defined(OS_WIN)
+#include "views/controls/scrollbar/native_scroll_bar.h"
+#endif
+
using base::TimeDelta;
// static
@@ -406,7 +409,12 @@ gfx::Rect BrowserView::GetFindBarBoundingBox() const {
// Finally decrease the width of the bounding box by the width of the vertical
// scroll bar.
+#if defined(OS_WIN)
int scrollbar_width = views::NativeScrollBar::GetVerticalScrollBarWidth();
+#else
+ // This matches the value in ScrollbarThemeChromium::scrollbarThickness.
+ int scrollbar_width = 15;
+#endif
bounding_box.set_width(std::max(0, bounding_box.width() - scrollbar_width));
if (UILayoutIsRightToLeft())
bounding_box.set_x(bounding_box.x() + scrollbar_width);