diff options
Diffstat (limited to 'chrome/browser/views/find_bar_host_gtk.cc')
-rw-r--r-- | chrome/browser/views/find_bar_host_gtk.cc | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/chrome/browser/views/find_bar_host_gtk.cc b/chrome/browser/views/find_bar_host_gtk.cc index e517407..e4a46a2 100644 --- a/chrome/browser/views/find_bar_host_gtk.cc +++ b/chrome/browser/views/find_bar_host_gtk.cc @@ -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::SetDialogPositionNative(const gfx::Rect& new_pos, } 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()); } |