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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
188 | 188 |
189 return true; | 189 return true; |
190 } | 190 } |
191 | 191 |
192 //////////////////////////////////////////////////////////////////////////////// | 192 //////////////////////////////////////////////////////////////////////////////// |
193 // FindBarTesting implementation: | 193 // FindBarTesting implementation: |
194 | 194 |
195 bool FindBarHost::GetFindBarWindowInfo(gfx::Point* position, | 195 bool FindBarHost::GetFindBarWindowInfo(gfx::Point* position, |
196 bool* fully_visible) { | 196 bool* fully_visible) { |
197 if (!find_bar_controller_ || | 197 if (!find_bar_controller_ || |
198 #if defined(OS_WIN) | 198 #if defined(OS_WIN) && !defined(USE_AURA) |
199 !::IsWindow(host()->GetNativeView())) { | 199 !::IsWindow(host()->GetNativeView())) { |
200 #else | 200 #else |
201 false) { | 201 false) { |
202 // TODO(sky): figure out linux side. | 202 // TODO(sky): figure out linux side. |
203 // This is tricky due to asynchronous nature of x11. | 203 // This is tricky due to asynchronous nature of x11. |
204 // See bug http://crbug.com/28629. | 204 // See bug http://crbug.com/28629. |
sky
2011/09/06 17:22:48
NOTIMPLMENETED?
| |
205 #endif | 205 #endif |
206 if (position) | 206 if (position) |
207 *position = gfx::Point(); | 207 *position = gfx::Point(); |
208 if (fully_visible) | 208 if (fully_visible) |
209 *fully_visible = false; | 209 *fully_visible = false; |
210 return false; | 210 return false; |
211 } | 211 } |
212 | 212 |
213 gfx::Rect window_rect = host()->GetWindowScreenBounds(); | 213 gfx::Rect window_rect = host()->GetWindowScreenBounds(); |
214 if (position) | 214 if (position) |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
315 | 315 |
316 DropdownBarHost::UnregisterAccelerators(); | 316 DropdownBarHost::UnregisterAccelerators(); |
317 } | 317 } |
318 | 318 |
319 //////////////////////////////////////////////////////////////////////////////// | 319 //////////////////////////////////////////////////////////////////////////////// |
320 // private: | 320 // private: |
321 | 321 |
322 FindBarView* FindBarHost::find_bar_view() { | 322 FindBarView* FindBarHost::find_bar_view() { |
323 return static_cast<FindBarView*>(view()); | 323 return static_cast<FindBarView*>(view()); |
324 } | 324 } |
OLD | NEW |