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

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

Issue 340077: Gets find bar animation/clipping to work on views/gtk. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 1 month 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
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());
}

Powered by Google App Engine
This is Rietveld 408576698