Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1060)

Unified Diff: chrome/browser/ui/views/find_bar_host_gtk.cc

Issue 6012011: TabContentsViewViews should be used instead of TabContentsViewGtk for TOUCH_UI (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698