| 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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 return g_instance; | 155 return g_instance; |
| 156 } | 156 } |
| 157 | 157 |
| 158 RemoteRootWindowHostWin::RemoteRootWindowHostWin(const gfx::Rect& bounds) | 158 RemoteRootWindowHostWin::RemoteRootWindowHostWin(const gfx::Rect& bounds) |
| 159 : remote_window_(NULL), | 159 : remote_window_(NULL), |
| 160 host_(NULL), | 160 host_(NULL), |
| 161 ignore_mouse_moves_until_set_cursor_ack_(false), | 161 ignore_mouse_moves_until_set_cursor_ack_(false), |
| 162 event_flags_(0), | 162 event_flags_(0), |
| 163 window_size_(aura::RootWindowHost::GetNativeScreenSize()) { | 163 window_size_(aura::RootWindowHost::GetNativeScreenSize()) { |
| 164 prop_.reset(new ui::ViewProp(NULL, kRootWindowHostWinKey, this)); | 164 prop_.reset(new ui::ViewProp(NULL, kRootWindowHostWinKey, this)); |
| 165 CreateCompositor(GetAcceleratedWidget()); |
| 165 } | 166 } |
| 166 | 167 |
| 167 RemoteRootWindowHostWin::~RemoteRootWindowHostWin() { | 168 RemoteRootWindowHostWin::~RemoteRootWindowHostWin() { |
| 168 g_instance = NULL; | 169 g_instance = NULL; |
| 169 } | 170 } |
| 170 | 171 |
| 171 void RemoteRootWindowHostWin::Connected(IPC::Sender* host, HWND remote_window) { | 172 void RemoteRootWindowHostWin::Connected(IPC::Sender* host, HWND remote_window) { |
| 172 CHECK(host_ == NULL); | 173 CHECK(host_ == NULL); |
| 173 host_ = host; | 174 host_ = host; |
| 174 remote_window_ = remote_window; | 175 remote_window_ = remote_window; |
| 175 CreateCompositor(remote_window_); | |
| 176 } | 176 } |
| 177 | 177 |
| 178 void RemoteRootWindowHostWin::Disconnected() { | 178 void RemoteRootWindowHostWin::Disconnected() { |
| 179 // Don't CHECK here, Disconnected is called on a channel error which can | 179 // Don't CHECK here, Disconnected is called on a channel error which can |
| 180 // happen before we're successfully Connected. | 180 // happen before we're successfully Connected. |
| 181 if (!host_) | 181 if (!host_) |
| 182 return; | 182 return; |
| 183 ui::RemoteInputMethodPrivateWin* remote_input_method_private = | 183 ui::RemoteInputMethodPrivateWin* remote_input_method_private = |
| 184 GetRemoteInputMethodPrivate(); | 184 GetRemoteInputMethodPrivate(); |
| 185 if (remote_input_method_private) | 185 if (remote_input_method_private) |
| (...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 711 } | 711 } |
| 712 | 712 |
| 713 void RemoteRootWindowHostWin::SetEventFlags(uint32 flags) { | 713 void RemoteRootWindowHostWin::SetEventFlags(uint32 flags) { |
| 714 if (flags == event_flags_) | 714 if (flags == event_flags_) |
| 715 return; | 715 return; |
| 716 event_flags_ = flags; | 716 event_flags_ = flags; |
| 717 SetVirtualKeyStates(event_flags_); | 717 SetVirtualKeyStates(event_flags_); |
| 718 } | 718 } |
| 719 | 719 |
| 720 } // namespace aura | 720 } // namespace aura |
| OLD | NEW |