diff options
author | robertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-23 12:57:25 +0000 |
---|---|---|
committer | robertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-23 12:57:25 +0000 |
commit | 0a02eabbfbfdc4de544bfa861e0f639911e3e8c6 (patch) | |
tree | e89a689b72dc8a49a2846db768b7389a8715afb6 /ui | |
parent | 95471194b8a58d9a9f0ea25160fa16f2b6b646aa (diff) | |
download | chromium_src-0a02eabbfbfdc4de544bfa861e0f639911e3e8c6.zip chromium_src-0a02eabbfbfdc4de544bfa861e0f639911e3e8c6.tar.gz chromium_src-0a02eabbfbfdc4de544bfa861e0f639911e3e8c6.tar.bz2 |
Fix Ash on Windows multi-monitor support and snap-view sizing.
Plumb through window size events to the remote root window host.
Also add an initial sizing message to get Ash's initial state to be correct.
BUG=236379
TEST=Move Ash from one monitor to another with a different size, observe that things resize themselves correctly. Also, snap Ash, observe similar goodness.
Review URL: https://chromiumcodereview.appspot.com/15599002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201771 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r-- | ui/aura/remote_root_window_host_win.cc | 6 | ||||
-rw-r--r-- | ui/aura/remote_root_window_host_win.h | 2 | ||||
-rw-r--r-- | ui/metro_viewer/metro_viewer_messages.h | 6 |
3 files changed, 14 insertions, 0 deletions
diff --git a/ui/aura/remote_root_window_host_win.cc b/ui/aura/remote_root_window_host_win.cc index d6b72df..3601ea2 100644 --- a/ui/aura/remote_root_window_host_win.cc +++ b/ui/aura/remote_root_window_host_win.cc @@ -161,6 +161,8 @@ bool RemoteRootWindowHostWin::OnMessageReceived(const IPC::Message& message) { OnWindowActivated) IPC_MESSAGE_HANDLER(MetroViewerHostMsg_SetCursorPosAck, OnSetCursorPosAck) + IPC_MESSAGE_HANDLER(MetroViewerHostMsg_WindowSizeChanged, + OnWindowSizeChanged) IPC_MESSAGE_UNHANDLED(handled = false) IPC_END_MESSAGE_MAP() return handled; @@ -502,6 +504,10 @@ void RemoteRootWindowHostWin::OnSetCursorPosAck() { ignore_mouse_moves_until_set_cursor_ack_ = false; } +void RemoteRootWindowHostWin::OnWindowSizeChanged(uint32 width, uint32 height) { + SetBounds(gfx::Rect(0, 0, width, height)); +} + void RemoteRootWindowHostWin::DispatchKeyboardMessage(ui::EventType type, uint32 vkey, uint32 repeat_count, diff --git a/ui/aura/remote_root_window_host_win.h b/ui/aura/remote_root_window_host_win.h index 0577ee7..bf30629 100644 --- a/ui/aura/remote_root_window_host_win.h +++ b/ui/aura/remote_root_window_host_win.h @@ -149,6 +149,8 @@ class AURA_EXPORT RemoteRootWindowHostWin : public RootWindowHost { void OnSelectFolderDone(bool success, const base::FilePath& folder); void OnWindowActivated(bool active); void OnSetCursorPosAck(); + void OnWindowSizeChanged(uint32 width, uint32 height); + // RootWindowHost overrides: virtual void SetDelegate(RootWindowHostDelegate* delegate) OVERRIDE; virtual RootWindow* GetRootWindow() OVERRIDE; diff --git a/ui/metro_viewer/metro_viewer_messages.h b/ui/metro_viewer/metro_viewer_messages.h index f301618..8d0d452 100644 --- a/ui/metro_viewer/metro_viewer_messages.h +++ b/ui/metro_viewer/metro_viewer_messages.h @@ -145,3 +145,9 @@ IPC_MESSAGE_CONTROL2(MetroViewerHostMsg_SetCursorPos, // Ack sent by the viewer process indicating that the SetCursorPos operation // was completed. IPC_MESSAGE_CONTROL0(MetroViewerHostMsg_SetCursorPosAck) + +// Sent from the metro viewer process to the browser process to indicate that +// the viewer window size has changed. +IPC_MESSAGE_CONTROL2(MetroViewerHostMsg_WindowSizeChanged, + uint32, /* width */ + uint32) /* height */ |