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

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

Issue 11030017: Add context to gfx::Screen calls in support of simultaneous desktop+ash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix other os's Created 8 years, 2 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 d27ed9d196e65e8d2f239b723c3ca88bdc832513..7c8178ebaa8eb10f73cbc171225655efe2b5deb7 100644
--- a/chrome/browser/ui/panels/display_settings_provider.cc
+++ b/chrome/browser/ui/panels/display_settings_provider.cc
@@ -69,7 +69,8 @@ gfx::Rect DisplaySettingsProvider::GetDisplayArea() {
}
gfx::Rect DisplaySettingsProvider::GetPrimaryScreenArea() const {
- return gfx::Screen::GetPrimaryDisplay().bounds();
+ return gfx::Screen::GetPrimaryDisplay(
+ gfx::Screen::BadTwoWorldsContext()).bounds();
}
gfx::Rect DisplaySettingsProvider::GetWorkArea() const {
@@ -78,7 +79,8 @@ gfx::Rect DisplaySettingsProvider::GetWorkArea() 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.
- gfx::Display display = gfx::Screen::GetPrimaryDisplay();
+ gfx::Display display = gfx::Screen::GetPrimaryDisplay(
+ gfx::Screen::BadTwoWorldsContext());
gfx::Rect display_area = display.bounds();
gfx::Rect work_area = display.work_area();
int system_menu_height = work_area.y() - display_area.y();
@@ -88,7 +90,8 @@ gfx::Rect DisplaySettingsProvider::GetWorkArea() const {
}
return display_area;
#else
- gfx::Rect work_area = gfx::Screen::GetPrimaryDisplay().work_area();
+ gfx::Rect work_area = gfx::Screen::GetPrimaryDisplay(
+ gfx::Screen::BadTwoWorldsContext()).work_area();
#endif
return work_area;
}

Powered by Google App Engine
This is Rietveld 408576698