Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ui/aura/remote_root_window_host_win.h" | 5 #include "ui/aura/remote_root_window_host_win.h" |
| 6 | 6 |
| 7 #include <windows.h> | 7 #include <windows.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 | 10 |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 143 g_instance = NULL; | 143 g_instance = NULL; |
| 144 } | 144 } |
| 145 | 145 |
| 146 void RemoteRootWindowHostWin::Connected(IPC::Sender* host, HWND remote_window) { | 146 void RemoteRootWindowHostWin::Connected(IPC::Sender* host, HWND remote_window) { |
| 147 CHECK(host_ == NULL); | 147 CHECK(host_ == NULL); |
| 148 host_ = host; | 148 host_ = host; |
| 149 remote_window_ = remote_window; | 149 remote_window_ = remote_window; |
| 150 } | 150 } |
| 151 | 151 |
| 152 void RemoteRootWindowHostWin::Disconnected() { | 152 void RemoteRootWindowHostWin::Disconnected() { |
| 153 CHECK(host_ != NULL); | |
|
sky
2013/11/06 21:28:48
Please add a comment that we already be disconnect
| |
| 154 host_ = NULL; | 153 host_ = NULL; |
| 155 remote_window_ = NULL; | 154 remote_window_ = NULL; |
| 156 } | 155 } |
| 157 | 156 |
| 158 bool RemoteRootWindowHostWin::OnMessageReceived(const IPC::Message& message) { | 157 bool RemoteRootWindowHostWin::OnMessageReceived(const IPC::Message& message) { |
| 159 bool handled = true; | 158 bool handled = true; |
| 160 IPC_BEGIN_MESSAGE_MAP(RemoteRootWindowHostWin, message) | 159 IPC_BEGIN_MESSAGE_MAP(RemoteRootWindowHostWin, message) |
| 161 IPC_MESSAGE_HANDLER(MetroViewerHostMsg_MouseMoved, OnMouseMoved) | 160 IPC_MESSAGE_HANDLER(MetroViewerHostMsg_MouseMoved, OnMouseMoved) |
| 162 IPC_MESSAGE_HANDLER(MetroViewerHostMsg_MouseButton, OnMouseButton) | 161 IPC_MESSAGE_HANDLER(MetroViewerHostMsg_MouseButton, OnMouseButton) |
| 163 IPC_MESSAGE_HANDLER(MetroViewerHostMsg_KeyDown, OnKeyDown) | 162 IPC_MESSAGE_HANDLER(MetroViewerHostMsg_KeyDown, OnKeyDown) |
| (...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 609 } | 608 } |
| 610 | 609 |
| 611 void RemoteRootWindowHostWin::SetEventFlags(uint32 flags) { | 610 void RemoteRootWindowHostWin::SetEventFlags(uint32 flags) { |
| 612 if (flags == event_flags_) | 611 if (flags == event_flags_) |
| 613 return; | 612 return; |
| 614 event_flags_ = flags; | 613 event_flags_ = flags; |
| 615 SetVirtualKeyStates(event_flags_); | 614 SetVirtualKeyStates(event_flags_); |
| 616 } | 615 } |
| 617 | 616 |
| 618 } // namespace aura | 617 } // namespace aura |
| OLD | NEW |