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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/ui/views/find_bar_host_aura.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/find_bar_host.h" 5 #include "chrome/browser/ui/views/find_bar_host.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "chrome/browser/ui/find_bar/find_bar_controller.h" 9 #include "chrome/browser/ui/find_bar/find_bar_controller.h"
10 #include "chrome/browser/ui/find_bar/find_tab_helper.h" 10 #include "chrome/browser/ui/find_bar/find_tab_helper.h"
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 // Unregister Ctrl+Return. 310 // Unregister Ctrl+Return.
311 ui::Accelerator escape(ui::VKEY_RETURN, false, true, false); 311 ui::Accelerator escape(ui::VKEY_RETURN, false, true, false);
312 focus_manager()->UnregisterAccelerator(escape, this); 312 focus_manager()->UnregisterAccelerator(escape, this);
313 313
314 DropdownBarHost::UnregisterAccelerators(); 314 DropdownBarHost::UnregisterAccelerators();
315 } 315 }
316 316
317 //////////////////////////////////////////////////////////////////////////////// 317 ////////////////////////////////////////////////////////////////////////////////
318 // private: 318 // private:
319 319
320 void FindBarHost::GetWidgetPositionNative(gfx::Rect* avoid_overlapping_rect) {
321 gfx::Rect frame_rect = host()->GetTopLevelWidget()->GetWindowScreenBounds();
322 TabContentsView* tab_view = find_bar_controller_->tab_contents()->view();
323 gfx::Rect webcontents_rect;
324 tab_view->GetViewBounds(&webcontents_rect);
325 avoid_overlapping_rect->Offset(0, webcontents_rect.y() - frame_rect.y());
326 }
327
320 FindBarView* FindBarHost::find_bar_view() { 328 FindBarView* FindBarHost::find_bar_view() {
321 return static_cast<FindBarView*>(view()); 329 return static_cast<FindBarView*>(view());
322 } 330 }
OLDNEW
« 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