| 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 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 select_folder_completion_callback_ = on_success; | 292 select_folder_completion_callback_ = on_success; |
| 293 failure_callback_ = on_failure; | 293 failure_callback_ = on_failure; |
| 294 | 294 |
| 295 host_->Send(new MetroViewerHostMsg_DisplaySelectFolder(title)); | 295 host_->Send(new MetroViewerHostMsg_DisplaySelectFolder(title)); |
| 296 } | 296 } |
| 297 | 297 |
| 298 Window* RemoteRootWindowHostWin::GetAshWindow() { | 298 Window* RemoteRootWindowHostWin::GetAshWindow() { |
| 299 return GetRootWindow()->window(); | 299 return GetRootWindow()->window(); |
| 300 } | 300 } |
| 301 | 301 |
| 302 void RemoteRootWindowHostWin::SetDelegate(RootWindowHostDelegate* delegate) { | |
| 303 delegate_ = delegate; | |
| 304 } | |
| 305 | |
| 306 RootWindow* RemoteRootWindowHostWin::GetRootWindow() { | 302 RootWindow* RemoteRootWindowHostWin::GetRootWindow() { |
| 307 return delegate_->AsRootWindow(); | 303 return delegate_->AsRootWindow(); |
| 308 } | 304 } |
| 309 | 305 |
| 310 gfx::AcceleratedWidget RemoteRootWindowHostWin::GetAcceleratedWidget() { | 306 gfx::AcceleratedWidget RemoteRootWindowHostWin::GetAcceleratedWidget() { |
| 311 if (remote_window_) | 307 if (remote_window_) |
| 312 return remote_window_; | 308 return remote_window_; |
| 313 // Getting here should only happen for ash_unittests.exe and related code. | 309 // Getting here should only happen for ash_unittests.exe and related code. |
| 314 return ::GetDesktopWindow(); | 310 return ::GetDesktopWindow(); |
| 315 } | 311 } |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 400 // mouse messages from the viewer which were posted before the SetCursor | 396 // mouse messages from the viewer which were posted before the SetCursor |
| 401 // API executes which messes up the state in the browser. To workaround | 397 // API executes which messes up the state in the browser. To workaround |
| 402 // this we invoke the SetCursor API in the viewer process and ignore | 398 // this we invoke the SetCursor API in the viewer process and ignore |
| 403 // mouse messages until we received an ACK from the viewer indicating that | 399 // mouse messages until we received an ACK from the viewer indicating that |
| 404 // the SetCursor operation completed. | 400 // the SetCursor operation completed. |
| 405 ignore_mouse_moves_until_set_cursor_ack_ = true; | 401 ignore_mouse_moves_until_set_cursor_ack_ = true; |
| 406 VLOG(1) << "In MoveCursorTo. Sending IPC"; | 402 VLOG(1) << "In MoveCursorTo. Sending IPC"; |
| 407 host_->Send(new MetroViewerHostMsg_SetCursorPos(location.x(), location.y())); | 403 host_->Send(new MetroViewerHostMsg_SetCursorPos(location.x(), location.y())); |
| 408 } | 404 } |
| 409 | 405 |
| 410 void RemoteRootWindowHostWin::SetFocusWhenShown(bool focus_when_shown) { | |
| 411 NOTIMPLEMENTED(); | |
| 412 } | |
| 413 | |
| 414 void RemoteRootWindowHostWin::PostNativeEvent( | 406 void RemoteRootWindowHostWin::PostNativeEvent( |
| 415 const base::NativeEvent& native_event) { | 407 const base::NativeEvent& native_event) { |
| 416 } | 408 } |
| 417 | 409 |
| 418 void RemoteRootWindowHostWin::OnDeviceScaleFactorChanged( | 410 void RemoteRootWindowHostWin::OnDeviceScaleFactorChanged( |
| 419 float device_scale_factor) { | 411 float device_scale_factor) { |
| 420 NOTIMPLEMENTED(); | 412 NOTIMPLEMENTED(); |
| 421 } | 413 } |
| 422 | 414 |
| 423 void RemoteRootWindowHostWin::PrepareForShutdown() { | 415 void RemoteRootWindowHostWin::PrepareForShutdown() { |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 610 } | 602 } |
| 611 | 603 |
| 612 void RemoteRootWindowHostWin::SetEventFlags(uint32 flags) { | 604 void RemoteRootWindowHostWin::SetEventFlags(uint32 flags) { |
| 613 if (flags == event_flags_) | 605 if (flags == event_flags_) |
| 614 return; | 606 return; |
| 615 event_flags_ = flags; | 607 event_flags_ = flags; |
| 616 SetVirtualKeyStates(event_flags_); | 608 SetVirtualKeyStates(event_flags_); |
| 617 } | 609 } |
| 618 | 610 |
| 619 } // namespace aura | 611 } // namespace aura |
| OLD | NEW |