summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/find_bar_host_gtk.cc
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-04 05:05:48 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-04 05:05:48 +0000
commita3406979cd56b42ec58244e6382ca77c2c93205d (patch)
tree76d2c688df49a6d3dc3d182c86b15ffe5ba9cf8e /chrome/browser/views/find_bar_host_gtk.cc
parent1111563020b92fc9f6943e0b5c00f66de2f57082 (diff)
downloadchromium_src-a3406979cd56b42ec58244e6382ca77c2c93205d.zip
chromium_src-a3406979cd56b42ec58244e6382ca77c2c93205d.tar.gz
chromium_src-a3406979cd56b42ec58244e6382ca77c2c93205d.tar.bz2
Attempt 2 at:
Gets find bar animation/clipping to work on views/gtk. The only difference between this and the first version is fixing an include in extension_host that was triggering mac to build views, as well as an extraneous SetSlideDuration I had used for testing. BUG=none TEST=none TBR=ben Review URL: http://codereview.chromium.org/342116 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30942 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/find_bar_host_gtk.cc')
-rw-r--r--chrome/browser/views/find_bar_host_gtk.cc15
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());
}