diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-13 03:35:02 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-13 03:35:02 +0000 |
commit | 00d3a7620f415e424ceace688bb3371d18296835 (patch) | |
tree | a17cf1e6dc8faef24b8267c293df12effe9520b8 /ash/test | |
parent | dbd338c407ffa968e72857a5956aac8cabf0db72 (diff) | |
download | chromium_src-00d3a7620f415e424ceace688bb3371d18296835.zip chromium_src-00d3a7620f415e424ceace688bb3371d18296835.tar.gz chromium_src-00d3a7620f415e424ceace688bb3371d18296835.tar.bz2 |
Send the device scale factor from Windows 8 ASH during initialization via the MetroViewerHostMsg_SetTargetSurface IPC message.
cpu, please review everything.
sky, please review the ash/chrome/ui portions.
I added a dependency on gfx in the metro_driver project for a subsequent change to send the correct device scale
factor on Windows 8 as the metro API does not appear to work correctly causing text, etc to appear very small on
high dpi monitors with scales above 125%.
BUG=371219
R=cpu,sky
Review URL: https://codereview.chromium.org/271543009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@269993 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/test')
-rw-r--r-- | ash/test/test_metro_viewer_process_host.cc | 6 | ||||
-rw-r--r-- | ash/test/test_metro_viewer_process_host.h | 3 |
2 files changed, 6 insertions, 3 deletions
diff --git a/ash/test/test_metro_viewer_process_host.cc b/ash/test/test_metro_viewer_process_host.cc index ddcfa1b..5dd448c 100644 --- a/ash/test/test_metro_viewer_process_host.cc +++ b/ash/test/test_metro_viewer_process_host.cc @@ -26,10 +26,12 @@ void TestMetroViewerProcessHost::OnChannelError() { } void TestMetroViewerProcessHost::OnSetTargetSurface( - gfx::NativeViewId target_surface) { + gfx::NativeViewId target_surface, + float device_scale) { DLOG(INFO) << __FUNCTION__ << ", target_surface = " << target_surface; HWND hwnd = reinterpret_cast<HWND>(target_surface); - aura::RemoteWindowTreeHostWin::Instance()->SetRemoteWindowHandle(hwnd); + aura::RemoteWindowTreeHostWin::Instance()-> + InitializeRemoteWindowAndScaleFactor(hwnd, device_scale); aura::RemoteWindowTreeHostWin::Instance()->Connected(this); } diff --git a/ash/test/test_metro_viewer_process_host.h b/ash/test/test_metro_viewer_process_host.h index 25a66e3..f04ff0f 100644 --- a/ash/test/test_metro_viewer_process_host.h +++ b/ash/test/test_metro_viewer_process_host.h @@ -23,7 +23,8 @@ class TestMetroViewerProcessHost : public win8::MetroViewerProcessHost { private: // win8::MetroViewerProcessHost implementation virtual void OnChannelError() OVERRIDE; - virtual void OnSetTargetSurface(gfx::NativeViewId target_surface) OVERRIDE; + virtual void OnSetTargetSurface(gfx::NativeViewId target_surface, + float device_scale) OVERRIDE; virtual void OnOpenURL(const base::string16& url) OVERRIDE; virtual void OnHandleSearchRequest( const base::string16& search_string) OVERRIDE; |