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

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

Issue 1920263003: Rename gfx::Display/Screen to display::Display/Screen in chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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_view_common.cc
diff --git a/chrome/browser/ui/autofill/popup_view_common.cc b/chrome/browser/ui/autofill/popup_view_common.cc
index a342aac367a8e4225dc5f25296f4e4167c59af78..e74567c2a65ae65b0ab449484761bb7b9c7bf296 100644
--- a/chrome/browser/ui/autofill/popup_view_common.cc
+++ b/chrome/browser/ui/autofill/popup_view_common.cc
@@ -7,21 +7,22 @@
#include <algorithm>
#include <utility>
-#include "ui/gfx/display.h"
+#include "ui/display/display.h"
+#include "ui/display/screen.h"
#include "ui/gfx/geometry/point.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/vector2d.h"
-#include "ui/gfx/screen.h"
namespace autofill {
namespace {
-std::pair<int, int> CalculatePopupXAndWidth(const gfx::Display& left_display,
- const gfx::Display& right_display,
- int popup_required_width,
- const gfx::Rect element_bounds,
- bool is_rtl) {
+std::pair<int, int> CalculatePopupXAndWidth(
+ const display::Display& left_display,
+ const display::Display& right_display,
+ int popup_required_width,
+ const gfx::Rect element_bounds,
Lei Zhang 2016/04/28 20:13:10 Oh, I noticed these aren't being passed in by refe
oshima 2016/04/28 20:19:04 Done.
+ bool is_rtl) {
int leftmost_display_x = left_display.bounds().x();
int rightmost_display_x =
right_display.GetSizeInPixel().width() + right_display.bounds().x();
@@ -58,10 +59,11 @@ std::pair<int, int> CalculatePopupXAndWidth(const gfx::Display& left_display,
// Calculates the height of the popup and the y position of it. These values
// will stay on the screen.
-std::pair<int, int> CalculatePopupYAndHeight(const gfx::Display& top_display,
- const gfx::Display& bottom_display,
- int popup_required_height,
- const gfx::Rect element_bounds) {
+std::pair<int, int> CalculatePopupYAndHeight(
+ const display::Display& top_display,
+ const display::Display& bottom_display,
+ int popup_required_height,
+ const gfx::Rect element_bounds) {
oshima 2016/04/28 20:19:04 and here too
int topmost_display_y = top_display.bounds().y();
int bottommost_display_y =
bottom_display.GetSizeInPixel().height() + bottom_display.bounds().y();
@@ -110,9 +112,9 @@ gfx::Rect PopupViewCommon::CalculatePopupBounds(int desired_width,
element_bounds.origin() +
gfx::Vector2d(desired_width, element_bounds.height() + desired_height);
- gfx::Display top_left_display =
+ display::Display top_left_display =
GetDisplayNearestPoint(top_left_corner_of_popup, container_view);
- gfx::Display bottom_right_display =
+ display::Display bottom_right_display =
GetDisplayNearestPoint(bottom_right_corner_of_popup, container_view);
std::pair<int, int> popup_x_and_width =
@@ -125,10 +127,10 @@ gfx::Rect PopupViewCommon::CalculatePopupBounds(int desired_width,
popup_x_and_width.second, popup_y_and_height.second);
}
-gfx::Display PopupViewCommon::GetDisplayNearestPoint(
+display::Display PopupViewCommon::GetDisplayNearestPoint(
const gfx::Point& point,
gfx::NativeView container_view) {
- return gfx::Screen::GetScreen()->GetDisplayNearestPoint(point);
+ return display::Screen::GetScreen()->GetDisplayNearestPoint(point);
}
} // namespace autofill

Powered by Google App Engine
This is Rietveld 408576698