OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/popup_view_common.h" | 5 #include "chrome/browser/ui/autofill/popup_view_common.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "ui/gfx/display.h" | 10 #include "ui/gfx/display.h" |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 std::pair<int, int> popup_y_and_height = CalculatePopupYAndHeight( | 121 std::pair<int, int> popup_y_and_height = CalculatePopupYAndHeight( |
122 top_left_display, bottom_right_display, desired_height, element_bounds); | 122 top_left_display, bottom_right_display, desired_height, element_bounds); |
123 | 123 |
124 return gfx::Rect(popup_x_and_width.first, popup_y_and_height.first, | 124 return gfx::Rect(popup_x_and_width.first, popup_y_and_height.first, |
125 popup_x_and_width.second, popup_y_and_height.second); | 125 popup_x_and_width.second, popup_y_and_height.second); |
126 } | 126 } |
127 | 127 |
128 gfx::Display PopupViewCommon::GetDisplayNearestPoint( | 128 gfx::Display PopupViewCommon::GetDisplayNearestPoint( |
129 const gfx::Point& point, | 129 const gfx::Point& point, |
130 gfx::NativeView container_view) { | 130 gfx::NativeView container_view) { |
131 return gfx::Screen::GetScreenFor(container_view) | 131 return gfx::Screen::GetScreen()->GetDisplayNearestPoint(point); |
132 ->GetDisplayNearestPoint(point); | |
133 } | 132 } |
134 | 133 |
135 } // namespace autofill | 134 } // namespace autofill |
OLD | NEW |