Index: chrome/browser/ui/views/find_bar_host_gtk.cc |
diff --git a/chrome/browser/ui/views/find_bar_host_gtk.cc b/chrome/browser/ui/views/find_bar_host_gtk.cc |
index e17c6d0e2f939f86fbcaa382a7ce7dd6203dae02..0ba52f9b1b72658f5eb142f0cd474282bbe237bd 100644 |
--- a/chrome/browser/ui/views/find_bar_host_gtk.cc |
+++ b/chrome/browser/ui/views/find_bar_host_gtk.cc |
@@ -6,6 +6,9 @@ |
#include "chrome/browser/tab_contents/tab_contents.h" |
#include "chrome/browser/ui/find_bar/find_bar_controller.h" |
+#if defined(TOUCH_UI) |
+#include "chrome/browser/ui/views/tab_contents/tab_contents_view_views.h" |
+#endif |
sadrul
2010/12/29 21:02:47
I think the conditional headers go below the gener
varunjain
2011/01/17 18:09:14
Done.
|
#include "chrome/browser/views/frame/browser_view.h" |
#include "chrome/browser/views/tab_contents/tab_contents_view_gtk.h" |
#include "views/widget/widget_gtk.h" |
@@ -19,8 +22,12 @@ void FindBarHost::GetWidgetPositionNative(gfx::Rect* avoid_overlapping_rect) { |
gfx::Rect frame_rect, webcontents_rect; |
host()->GetRootWidget()->GetBounds(&frame_rect, true); |
TabContentsView* tab_view = find_bar_controller_->tab_contents()->view(); |
+#if defined(TOUCH_UI) |
+ webcontents_rect = static_cast<TabContentsViewViews*>(tab_view)->bounds(); |
+#else |
static_cast<TabContentsViewGtk*>(tab_view)->GetBounds(&webcontents_rect, |
true); |
+#endif |
avoid_overlapping_rect->Offset(0, webcontents_rect.y() - frame_rect.y()); |
} |