Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4344)

Unified Diff: chrome/browser/ui/autofill/popup_controller_common.cc

Issue 342833002: [Password Generation] Update Aura UI (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Coments Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/autofill/popup_controller_common.cc
diff --git a/chrome/browser/ui/autofill/popup_controller_common.cc b/chrome/browser/ui/autofill/popup_controller_common.cc
index 1628bfa10d45d0c5a38f1ea1fd715977c409e2d7..c686cb932201dbf768667437705ac530bf767216 100644
--- a/chrome/browser/ui/autofill/popup_controller_common.cc
+++ b/chrome/browser/ui/autofill/popup_controller_common.cc
@@ -122,22 +122,21 @@ std::pair<int,int> PopupControllerCommon::CalculatePopupYAndHeight(
}
}
-gfx::Rect PopupControllerCommon::GetPopupBounds(
- int popup_required_height,
- int popup_required_width) const {
+gfx::Rect PopupControllerCommon::GetPopupBounds(int desired_width,
+ int desired_height) const {
// This is the top left point of the popup if the popup is above the element
// and grows to the left (since that is the highest and furthest left the
// popup go could).
gfx::Point top_left_corner_of_popup = RoundedElementBounds().origin() +
- gfx::Vector2d(RoundedElementBounds().width() - popup_required_width,
- -popup_required_height);
+ gfx::Vector2d(RoundedElementBounds().width() - desired_width,
+ -desired_height);
// This is the bottom right point of the popup if the popup is below the
// element and grows to the right (since the is the lowest and furthest right
// the popup could go).
gfx::Point bottom_right_corner_of_popup = RoundedElementBounds().origin() +
- gfx::Vector2d(popup_required_width,
- RoundedElementBounds().height() + popup_required_height);
+ gfx::Vector2d(desired_width,
+ RoundedElementBounds().height() + desired_height);
gfx::Display top_left_display = GetDisplayNearestPoint(
top_left_corner_of_popup);
@@ -147,11 +146,11 @@ gfx::Rect PopupControllerCommon::GetPopupBounds(
std::pair<int, int> popup_x_and_width =
CalculatePopupXAndWidth(top_left_display,
bottom_right_display,
- popup_required_width);
+ desired_width);
std::pair<int, int> popup_y_and_height =
CalculatePopupYAndHeight(top_left_display,
bottom_right_display,
- popup_required_height);
+ desired_height);
return gfx::Rect(popup_x_and_width.first,
popup_y_and_height.first,
« no previous file with comments | « chrome/browser/ui/autofill/popup_controller_common.h ('k') | chrome/browser/ui/autofill/popup_controller_common_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698