| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/views/find_bar_host.h" | 5 #include "chrome/browser/views/find_bar_host.h" |
| 6 | 6 |
| 7 #include "app/keyboard_codes.h" | 7 #include "app/keyboard_codes.h" |
| 8 #include "chrome/browser/renderer_host/render_view_host.h" | 8 #include "chrome/browser/renderer_host/render_view_host.h" |
| 9 #include "chrome/browser/tab_contents/tab_contents.h" | 9 #include "chrome/browser/tab_contents/tab_contents.h" |
| 10 #include "chrome/browser/tab_contents/tab_contents_view.h" | 10 #include "chrome/browser/tab_contents/tab_contents_view.h" |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 *position = window_rect.origin(); | 207 *position = window_rect.origin(); |
| 208 if (fully_visible) | 208 if (fully_visible) |
| 209 *fully_visible = IsVisible() && !IsAnimating(); | 209 *fully_visible = IsVisible() && !IsAnimating(); |
| 210 return true; | 210 return true; |
| 211 } | 211 } |
| 212 | 212 |
| 213 string16 FindBarHost::GetFindText() { | 213 string16 FindBarHost::GetFindText() { |
| 214 return find_bar_view()->GetFindText(); | 214 return find_bar_view()->GetFindText(); |
| 215 } | 215 } |
| 216 | 216 |
| 217 string16 FindBarHost::GetFindSelectedText() { |
| 218 return find_bar_view()->GetFindSelectedText(); |
| 219 } |
| 220 |
| 217 string16 FindBarHost::GetMatchCountText() { | 221 string16 FindBarHost::GetMatchCountText() { |
| 218 return find_bar_view()->GetMatchCountText(); | 222 return find_bar_view()->GetMatchCountText(); |
| 219 } | 223 } |
| 220 | 224 |
| 221 //////////////////////////////////////////////////////////////////////////////// | 225 //////////////////////////////////////////////////////////////////////////////// |
| 222 // Overridden from DropdownBarHost: | 226 // Overridden from DropdownBarHost: |
| 223 | 227 |
| 224 gfx::Rect FindBarHost::GetDialogPosition(gfx::Rect avoid_overlapping_rect) { | 228 gfx::Rect FindBarHost::GetDialogPosition(gfx::Rect avoid_overlapping_rect) { |
| 225 // Find the area we have to work with (after accounting for scrollbars, etc). | 229 // Find the area we have to work with (after accounting for scrollbars, etc). |
| 226 gfx::Rect widget_bounds; | 230 gfx::Rect widget_bounds; |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 | 299 |
| 296 DropdownBarHost::UnregisterAccelerators(); | 300 DropdownBarHost::UnregisterAccelerators(); |
| 297 } | 301 } |
| 298 | 302 |
| 299 //////////////////////////////////////////////////////////////////////////////// | 303 //////////////////////////////////////////////////////////////////////////////// |
| 300 // private: | 304 // private: |
| 301 | 305 |
| 302 FindBarView* FindBarHost::find_bar_view() { | 306 FindBarView* FindBarHost::find_bar_view() { |
| 303 return static_cast<FindBarView*>(view()); | 307 return static_cast<FindBarView*>(view()); |
| 304 } | 308 } |
| OLD | NEW |