OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/autofill/autofill_popup_controller_impl.h" | 5 #include "chrome/browser/ui/autofill/autofill_popup_controller_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/utf_string_conversions.h" | 11 #include "base/utf_string_conversions.h" |
12 #include "chrome/browser/autofill/autofill_popup_delegate.h" | |
13 #include "chrome/browser/ui/autofill/autofill_popup_view.h" | 12 #include "chrome/browser/ui/autofill/autofill_popup_view.h" |
| 13 #include "components/autofill/browser/autofill_popup_delegate.h" |
14 #include "content/public/browser/native_web_keyboard_event.h" | 14 #include "content/public/browser/native_web_keyboard_event.h" |
15 #include "grit/webkit_resources.h" | 15 #include "grit/webkit_resources.h" |
16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebAutofillClient.h" | 16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebAutofillClient.h" |
17 #include "ui/base/events/event.h" | 17 #include "ui/base/events/event.h" |
18 #include "ui/base/text/text_elider.h" | 18 #include "ui/base/text/text_elider.h" |
19 #include "ui/gfx/display.h" | 19 #include "ui/gfx/display.h" |
20 #include "ui/gfx/rect_conversions.h" | 20 #include "ui/gfx/rect_conversions.h" |
21 #include "ui/gfx/screen.h" | 21 #include "ui/gfx/screen.h" |
22 #include "ui/gfx/vector2d.h" | 22 #include "ui/gfx/vector2d.h" |
23 | 23 |
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
602 if (bottom_available >= popup_required_height || | 602 if (bottom_available >= popup_required_height || |
603 bottom_available >= top_available) { | 603 bottom_available >= top_available) { |
604 // The popup can appear below the field. | 604 // The popup can appear below the field. |
605 return std::make_pair(bottom_growth_start, popup_required_height); | 605 return std::make_pair(bottom_growth_start, popup_required_height); |
606 } else { | 606 } else { |
607 // The popup must appear above the field. | 607 // The popup must appear above the field. |
608 return std::make_pair(top_growth_end - popup_required_height, | 608 return std::make_pair(top_growth_end - popup_required_height, |
609 popup_required_height); | 609 popup_required_height); |
610 } | 610 } |
611 } | 611 } |
OLD | NEW |