| 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" |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 } | 222 } |
| 223 | 223 |
| 224 string16 FindBarHost::GetFindSelectedText() { | 224 string16 FindBarHost::GetFindSelectedText() { |
| 225 return find_bar_view()->GetFindSelectedText(); | 225 return find_bar_view()->GetFindSelectedText(); |
| 226 } | 226 } |
| 227 | 227 |
| 228 string16 FindBarHost::GetMatchCountText() { | 228 string16 FindBarHost::GetMatchCountText() { |
| 229 return find_bar_view()->GetMatchCountText(); | 229 return find_bar_view()->GetMatchCountText(); |
| 230 } | 230 } |
| 231 | 231 |
| 232 int FindBarHost::GetWidth() { |
| 233 NOTIMPLEMENTED(); |
| 234 return 0; |
| 235 } |
| 236 |
| 232 //////////////////////////////////////////////////////////////////////////////// | 237 //////////////////////////////////////////////////////////////////////////////// |
| 233 // Overridden from DropdownBarHost: | 238 // Overridden from DropdownBarHost: |
| 234 | 239 |
| 235 gfx::Rect FindBarHost::GetDialogPosition(gfx::Rect avoid_overlapping_rect) { | 240 gfx::Rect FindBarHost::GetDialogPosition(gfx::Rect avoid_overlapping_rect) { |
| 236 // Find the area we have to work with (after accounting for scrollbars, etc). | 241 // Find the area we have to work with (after accounting for scrollbars, etc). |
| 237 gfx::Rect widget_bounds; | 242 gfx::Rect widget_bounds; |
| 238 GetWidgetBounds(&widget_bounds); | 243 GetWidgetBounds(&widget_bounds); |
| 239 if (widget_bounds.IsEmpty()) | 244 if (widget_bounds.IsEmpty()) |
| 240 return gfx::Rect(); | 245 return gfx::Rect(); |
| 241 | 246 |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 | 311 |
| 307 DropdownBarHost::UnregisterAccelerators(); | 312 DropdownBarHost::UnregisterAccelerators(); |
| 308 } | 313 } |
| 309 | 314 |
| 310 //////////////////////////////////////////////////////////////////////////////// | 315 //////////////////////////////////////////////////////////////////////////////// |
| 311 // private: | 316 // private: |
| 312 | 317 |
| 313 FindBarView* FindBarHost::find_bar_view() { | 318 FindBarView* FindBarHost::find_bar_view() { |
| 314 return static_cast<FindBarView*>(view()); | 319 return static_cast<FindBarView*>(view()); |
| 315 } | 320 } |
| OLD | NEW |