| OLD | NEW |
| 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" |
| 11 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 11 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
| 12 #include "chrome/browser/ui/view_ids.h" | 12 #include "chrome/browser/ui/view_ids.h" |
| 13 #include "chrome/browser/ui/views/find_bar_view.h" | 13 #include "chrome/browser/ui/views/find_bar_view.h" |
| 14 #include "chrome/browser/ui/views/frame/browser_view.h" | 14 #include "chrome/browser/ui/views/frame/browser_view.h" |
| 15 #include "content/browser/renderer_host/render_view_host.h" | 15 #include "content/browser/renderer_host/render_view_host.h" |
| 16 #include "content/browser/tab_contents/tab_contents.h" | 16 #include "content/browser/tab_contents/tab_contents.h" |
| 17 #include "content/browser/tab_contents/tab_contents_view.h" | 17 #include "content/browser/tab_contents/tab_contents_view.h" |
| 18 #include "ui/base/keycodes/keyboard_codes.h" | 18 #include "ui/base/keycodes/keyboard_codes.h" |
| 19 #include "views/focus/external_focus_tracker.h" | 19 #include "ui/views/focus/external_focus_tracker.h" |
| 20 #include "views/focus/view_storage.h" | 20 #include "ui/views/focus/view_storage.h" |
| 21 #include "views/widget/root_view.h" | 21 #include "views/widget/root_view.h" |
| 22 #include "views/widget/widget.h" | 22 #include "views/widget/widget.h" |
| 23 | 23 |
| 24 namespace browser { | 24 namespace browser { |
| 25 | 25 |
| 26 // Declared in browser_dialogs.h so others don't have to depend on our header. | 26 // Declared in browser_dialogs.h so others don't have to depend on our header. |
| 27 FindBar* CreateFindBar(BrowserView* browser_view) { | 27 FindBar* CreateFindBar(BrowserView* browser_view) { |
| 28 return new FindBarHost(browser_view); | 28 return new FindBarHost(browser_view); |
| 29 } | 29 } |
| 30 | 30 |
| (...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 gfx::Rect frame_rect = host()->GetTopLevelWidget()->GetWindowScreenBounds(); | 321 gfx::Rect frame_rect = host()->GetTopLevelWidget()->GetWindowScreenBounds(); |
| 322 TabContentsView* tab_view = find_bar_controller_->tab_contents()->view(); | 322 TabContentsView* tab_view = find_bar_controller_->tab_contents()->view(); |
| 323 gfx::Rect webcontents_rect; | 323 gfx::Rect webcontents_rect; |
| 324 tab_view->GetViewBounds(&webcontents_rect); | 324 tab_view->GetViewBounds(&webcontents_rect); |
| 325 avoid_overlapping_rect->Offset(0, webcontents_rect.y() - frame_rect.y()); | 325 avoid_overlapping_rect->Offset(0, webcontents_rect.y() - frame_rect.y()); |
| 326 } | 326 } |
| 327 | 327 |
| 328 FindBarView* FindBarHost::find_bar_view() { | 328 FindBarView* FindBarHost::find_bar_view() { |
| 329 return static_cast<FindBarView*>(view()); | 329 return static_cast<FindBarView*>(view()); |
| 330 } | 330 } |
| OLD | NEW |