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

Unified Diff: chrome/browser/ui/window_sizer/window_sizer.h

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/window_sizer/window_sizer.h
diff --git a/chrome/browser/ui/window_sizer/window_sizer.h b/chrome/browser/ui/window_sizer/window_sizer.h
index a28983530d95009da2f6e9e9826aa817168d44c6..49a3193ba7a3f9df28bfb85983bf35768906f39a 100644
--- a/chrome/browser/ui/window_sizer/window_sizer.h
+++ b/chrome/browser/ui/window_sizer/window_sizer.h
@@ -18,6 +18,11 @@ class Display;
class Screen;
}
+namespace display {
+using Display = gfx::Display;
+using Screen = gfx::Screen;
+}
+
///////////////////////////////////////////////////////////////////////////////
// WindowSizer
//
@@ -35,7 +40,7 @@ class WindowSizer {
class TargetDisplayProvider;
// WindowSizer owns |state_provider| and |target_display_provider|,
- // and will use the platforms's gfx::Screen.
+ // and will use the platforms's display::Screen.
WindowSizer(std::unique_ptr<StateProvider> state_provider,
std::unique_ptr<TargetDisplayProvider> target_display_provider,
const Browser* browser);
@@ -44,7 +49,7 @@ class WindowSizer {
// and will use the supplied |screen|. Used only for testing.
WindowSizer(std::unique_ptr<StateProvider> state_provider,
std::unique_ptr<TargetDisplayProvider> target_display_provider,
- gfx::Screen* screen,
+ display::Screen* screen,
const Browser* browser);
virtual ~WindowSizer();
@@ -78,8 +83,9 @@ class WindowSizer {
class TargetDisplayProvider {
public:
virtual ~TargetDisplayProvider() {}
- virtual gfx::Display GetTargetDisplay(const gfx::Screen* screen,
- const gfx::Rect& bounds) const = 0;
+ virtual display::Display GetTargetDisplay(
+ const display::Screen* screen,
+ const gfx::Rect& bounds) const = 0;
};
// Determines the position and size for a window as it is created as well
@@ -137,7 +143,7 @@ class WindowSizer {
// |display| if there is no last window and no saved window
// placement in prefs. This function determines the default size
// based on monitor size, etc.
- void GetDefaultWindowBounds(const gfx::Display& display,
+ void GetDefaultWindowBounds(const display::Display& display,
gfx::Rect* default_bounds) const;
// Adjusts |bounds| to be visible on-screen, biased toward the work area of
@@ -148,15 +154,14 @@ class WindowSizer {
// monitor configuration has changed. If it has, bounds are repositioned and
// resized if necessary to make them completely contained in the current work
// area.
- void AdjustBoundsToBeVisibleOnDisplay(
- const gfx::Display& display,
- const gfx::Rect& saved_work_area,
- gfx::Rect* bounds) const;
+ void AdjustBoundsToBeVisibleOnDisplay(const display::Display& display,
+ const gfx::Rect& saved_work_area,
+ gfx::Rect* bounds) const;
// Determine the target display for a new window based on
// |bounds|. On ash environment, this returns the display containing
// ash's the target root window.
- gfx::Display GetTargetDisplay(const gfx::Rect& bounds) const;
+ display::Display GetTargetDisplay(const gfx::Rect& bounds) const;
#if defined(USE_ASH)
// Ash specific logic for window placement. Returns true if |bounds| and
@@ -183,7 +188,7 @@ class WindowSizer {
// Providers for persistent storage and monitor metrics.
std::unique_ptr<StateProvider> state_provider_;
std::unique_ptr<TargetDisplayProvider> target_display_provider_;
- gfx::Screen* screen_; // not owned.
+ display::Screen* screen_; // not owned.
// Note that this browser handle might be NULL.
const Browser* browser_;
« no previous file with comments | « chrome/browser/ui/webui/options/chromeos/display_overscan_handler.cc ('k') | chrome/browser/ui/window_sizer/window_sizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698