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

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

Issue 8573012: Unify views implementation of FindBarHost::GetWidgetPositionNative (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 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
« no previous file with comments | « no previous file | chrome/browser/ui/views/find_bar_host_aura.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/find_bar_host.cc
diff --git a/chrome/browser/ui/views/find_bar_host.cc b/chrome/browser/ui/views/find_bar_host.cc
index cb3025cbf3e570ac1f1f5e4231b5db3c0bbf05da..fe7e3fa029a891c3fc6c7185bb3d5f814355ec6b 100644
--- a/chrome/browser/ui/views/find_bar_host.cc
+++ b/chrome/browser/ui/views/find_bar_host.cc
@@ -317,6 +317,14 @@ void FindBarHost::UnregisterAccelerators() {
////////////////////////////////////////////////////////////////////////////////
// private:
+void FindBarHost::GetWidgetPositionNative(gfx::Rect* avoid_overlapping_rect) {
+ gfx::Rect frame_rect = host()->GetTopLevelWidget()->GetWindowScreenBounds();
+ TabContentsView* tab_view = find_bar_controller_->tab_contents()->view();
+ gfx::Rect webcontents_rect;
+ tab_view->GetViewBounds(&webcontents_rect);
+ avoid_overlapping_rect->Offset(0, webcontents_rect.y() - frame_rect.y());
+}
+
FindBarView* FindBarHost::find_bar_view() {
return static_cast<FindBarView*>(view());
}
« no previous file with comments | « no previous file | chrome/browser/ui/views/find_bar_host_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698