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

Unified Diff: chrome/browser/metro_viewer/chrome_metro_viewer_process_host_aurawin.cc

Issue 271543009: Send the device scale factor from Windows 8 ASH during initialization via the MetroViewerHostMsg_Se… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed tabs Created 6 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
Index: chrome/browser/metro_viewer/chrome_metro_viewer_process_host_aurawin.cc
diff --git a/chrome/browser/metro_viewer/chrome_metro_viewer_process_host_aurawin.cc b/chrome/browser/metro_viewer/chrome_metro_viewer_process_host_aurawin.cc
index ee614c18e3aa165ba41160b305ae38c0b65f1536..374f300b99498080279a972ae5d2cf41315a67ce 100644
--- a/chrome/browser/metro_viewer/chrome_metro_viewer_process_host_aurawin.cc
+++ b/chrome/browser/metro_viewer/chrome_metro_viewer_process_host_aurawin.cc
@@ -116,13 +116,15 @@ void ChromeMetroViewerProcessHost::OnChannelConnected(int32 /*peer_pid*/) {
}
void ChromeMetroViewerProcessHost::OnSetTargetSurface(
- gfx::NativeViewId target_surface) {
+ gfx::NativeViewId target_surface,
+ float device_scale) {
HWND hwnd = reinterpret_cast<HWND>(target_surface);
// Make hwnd available as early as possible for proper InputMethod
// initialization.
ash::AshRemoteWindowTreeHostWin::Init();
- aura::RemoteWindowTreeHostWin::Instance()->SetRemoteWindowHandle(hwnd);
+ aura::RemoteWindowTreeHostWin::Instance()->
+ InitializeRemoteWindowAndScaleFactor(hwnd, device_scale);
// Now start the Ash shell environment.
chrome::OpenAsh();
@@ -158,7 +160,7 @@ void ChromeMetroViewerProcessHost::OnWindowSizeChanged(uint32 width,
uint32 height) {
std::vector<ash::DisplayInfo> info_list;
info_list.push_back(ash::DisplayInfo::CreateFromSpec(
- base::StringPrintf("%dx%d*%f", width, height, gfx::GetModernUIScale())));
+ base::StringPrintf("%dx%d*%f", width, height, gfx::GetDPIScale())));
ash::Shell::GetInstance()->display_manager()->OnNativeDisplaysChanged(
info_list);
aura::RemoteWindowTreeHostWin::Instance()->HandleWindowSizeChanged(width,
« no previous file with comments | « chrome/browser/metro_viewer/chrome_metro_viewer_process_host_aurawin.h ('k') | ui/aura/remote_window_tree_host_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698