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

Unified Diff: chrome/browser/ui/panels/display_settings_provider.cc

Issue 1608733002: Remove ui/gfx/screen_type_delegate.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-4
Patch Set: GetNativeScreen Created 4 years, 11 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/panels/display_settings_provider.cc
diff --git a/chrome/browser/ui/panels/display_settings_provider.cc b/chrome/browser/ui/panels/display_settings_provider.cc
index d3700a393499156b3e3c4cb81759beaa6a4c9485..039d6ced69a59acd1f31f498fb9ce4e82b435275 100644
--- a/chrome/browser/ui/panels/display_settings_provider.cc
+++ b/chrome/browser/ui/panels/display_settings_provider.cc
@@ -66,8 +66,7 @@ void DisplaySettingsProvider::RemoveFullScreenObserver(
// TODO(scottmg): This should be moved to ui/.
gfx::Rect DisplaySettingsProvider::GetPrimaryDisplayArea() const {
- // TODO(scottmg): NativeScreen is wrong. http://crbug.com/133312
- return gfx::Screen::GetNativeScreen()->GetPrimaryDisplay().bounds();
+ return gfx::Screen::GetScreen()->GetPrimaryDisplay().bounds();
}
gfx::Rect DisplaySettingsProvider::GetPrimaryWorkArea() const {
@@ -76,8 +75,7 @@ gfx::Rect DisplaySettingsProvider::GetPrimaryWorkArea() const {
// screen (and overlap Dock). And we also want to exclude the system menu
// area. Note that the rect returned from gfx::Screen util functions is in
// platform-independent screen coordinates with (0, 0) as the top-left corner.
- // TODO(scottmg): NativeScreen is wrong. http://crbug.com/133312
- gfx::Display display = gfx::Screen::GetNativeScreen()->GetPrimaryDisplay();
+ gfx::Display display = gfx::Screen::GetScreen()->GetPrimaryDisplay();
gfx::Rect display_area = display.bounds();
gfx::Rect work_area = display.work_area();
int system_menu_height = work_area.y() - display_area.y();
@@ -87,21 +85,18 @@ gfx::Rect DisplaySettingsProvider::GetPrimaryWorkArea() const {
}
return display_area;
#else
- // TODO(scottmg): NativeScreen is wrong. http://crbug.com/133312
- return gfx::Screen::GetNativeScreen()->GetPrimaryDisplay().work_area();
+ return gfx::Screen::GetScreen()->GetPrimaryDisplay().work_area();
#endif
}
gfx::Rect DisplaySettingsProvider::GetDisplayAreaMatching(
const gfx::Rect& bounds) const {
- // TODO(scottmg): NativeScreen is wrong. http://crbug.com/133312
- return gfx::Screen::GetNativeScreen()->GetDisplayMatching(bounds).bounds();
+ return gfx::Screen::GetScreen()->GetDisplayMatching(bounds).bounds();
}
gfx::Rect DisplaySettingsProvider::GetWorkAreaMatching(
const gfx::Rect& bounds) const {
- // TODO(scottmg): NativeScreen is wrong. http://crbug.com/133312
- gfx::Screen* screen = gfx::Screen::GetNativeScreen();
+ gfx::Screen* screen = gfx::Screen::GetScreen();
gfx::Display display = screen->GetDisplayMatching(bounds);
if (display.bounds() == screen->GetPrimaryDisplay().bounds())
return GetPrimaryWorkArea();

Powered by Google App Engine
This is Rietveld 408576698