| 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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 : remote_window_(NULL), | 160 : remote_window_(NULL), |
| 161 host_(NULL), | 161 host_(NULL), |
| 162 ignore_mouse_moves_until_set_cursor_ack_(false), | 162 ignore_mouse_moves_until_set_cursor_ack_(false), |
| 163 event_flags_(0), | 163 event_flags_(0), |
| 164 window_size_(aura::WindowTreeHost::GetNativeScreenSize()) { | 164 window_size_(aura::WindowTreeHost::GetNativeScreenSize()) { |
| 165 prop_.reset(new ui::ViewProp(NULL, kWindowTreeHostWinKey, this)); | 165 prop_.reset(new ui::ViewProp(NULL, kWindowTreeHostWinKey, this)); |
| 166 CreateCompositor(GetAcceleratedWidget()); | 166 CreateCompositor(GetAcceleratedWidget()); |
| 167 } | 167 } |
| 168 | 168 |
| 169 RemoteWindowTreeHostWin::~RemoteWindowTreeHostWin() { | 169 RemoteWindowTreeHostWin::~RemoteWindowTreeHostWin() { |
| 170 DestroyCompositor(); |
| 170 g_instance = NULL; | 171 g_instance = NULL; |
| 171 } | 172 } |
| 172 | 173 |
| 173 void RemoteWindowTreeHostWin::Connected(IPC::Sender* host, HWND remote_window) { | 174 void RemoteWindowTreeHostWin::Connected(IPC::Sender* host, HWND remote_window) { |
| 174 CHECK(host_ == NULL); | 175 CHECK(host_ == NULL); |
| 175 host_ = host; | 176 host_ = host; |
| 176 remote_window_ = remote_window; | 177 remote_window_ = remote_window; |
| 177 // Recreate the compositor for the target surface represented by the | 178 // Recreate the compositor for the target surface represented by the |
| 178 // remote_window HWND. | 179 // remote_window HWND. |
| 179 CreateCompositor(remote_window_); | 180 CreateCompositor(remote_window_); |
| (...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 725 } | 726 } |
| 726 | 727 |
| 727 void RemoteWindowTreeHostWin::SetEventFlags(uint32 flags) { | 728 void RemoteWindowTreeHostWin::SetEventFlags(uint32 flags) { |
| 728 if (flags == event_flags_) | 729 if (flags == event_flags_) |
| 729 return; | 730 return; |
| 730 event_flags_ = flags; | 731 event_flags_ = flags; |
| 731 SetVirtualKeyStates(event_flags_); | 732 SetVirtualKeyStates(event_flags_); |
| 732 } | 733 } |
| 733 | 734 |
| 734 } // namespace aura | 735 } // namespace aura |
| OLD | NEW |