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

Unified Diff: chrome/browser/ui/views/frame/browser_view.cc

Issue 14348033: NOT FOR SUBMIT - Windows Views HiDPI (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Revert spurious changes, plus some corrections. Created 7 years, 7 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
« no previous file with comments | « chrome/browser/thumbnails/simple_thumbnail_crop.cc ('k') | chrome/browser/ui/views/status_bubble_views.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/frame/browser_view.cc
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc
index 95cf2ef2bb879f7a16ca55ac817f85c8d668be94..b37fe6478eed4a18c933ccda3f06ae2db8041872 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -144,6 +144,7 @@
#if defined(OS_WIN)
#include "base/win/windows_version.h"
+#include "ui/base/win/dpi.h"
#include "win8/util/win8_util.h"
#endif
@@ -827,7 +828,12 @@ void BrowserView::ZoomChangedForActiveTab(bool can_show_bubble) {
}
gfx::Rect BrowserView::GetRestoredBounds() const {
- return frame_->GetRestoredBounds();
+#if defined(OS_WIN)
+ gfx::Rect bounds_in_pixels = frame_->GetRestoredBounds();
+ return ui::win::ScreenToDIPRect(bounds_in_pixels);
+#else
+ return frame_->GetRestoredBounds();
+#endif
}
ui::WindowShowState BrowserView::GetRestoredState() const {
@@ -839,7 +845,12 @@ ui::WindowShowState BrowserView::GetRestoredState() const {
}
gfx::Rect BrowserView::GetBounds() const {
+#if defined(OS_WIN)
+ gfx::Rect bounds_in_pixels = frame_->GetWindowBoundsInScreen();
+ return ui::win::ScreenToDIPRect(bounds_in_pixels);
+#else
return frame_->GetWindowBoundsInScreen();
+#endif
}
bool BrowserView::IsMaximized() const {
« no previous file with comments | « chrome/browser/thumbnails/simple_thumbnail_crop.cc ('k') | chrome/browser/ui/views/status_bubble_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698