Index: chrome/browser/views/find_bar_host_gtk.cc |
=================================================================== |
--- chrome/browser/views/find_bar_host_gtk.cc (revision 30814) |
+++ chrome/browser/views/find_bar_host_gtk.cc (working copy) |
@@ -10,14 +10,9 @@ |
#include "chrome/browser/renderer_host/render_view_host.h" |
#include "chrome/browser/tab_contents/tab_contents.h" |
#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" |
-void FindBarHost::UpdateWindowEdges(const gfx::Rect& new_pos) { |
- // TODO(davemoore) move the windows implementation to CustomFrameWindow so we |
- // don't have to implement it for gtk |
- NOTIMPLEMENTED(); |
-} |
- |
void FindBarHost::AudibleAlert() { |
// TODO(davemoore) implement |
NOTIMPLEMENTED(); |
@@ -37,8 +32,12 @@ |
} |
void FindBarHost::GetDialogPositionNative(gfx::Rect* avoid_overlapping_rect) { |
- // TODO(davemoore) implement |
- NOTIMPLEMENTED(); |
+ gfx::Rect frame_rect, webcontents_rect; |
+ host_->GetRootWidget()->GetBounds(&frame_rect, true); |
+ TabContentsView* tab_view = find_bar_controller_->tab_contents()->view(); |
+ static_cast<TabContentsViewGtk*>(tab_view)->GetBounds(&webcontents_rect, |
+ true); |
+ avoid_overlapping_rect->Offset(0, webcontents_rect.y() - frame_rect.y()); |
} |