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 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 | 288 |
289 // Can only have one of these operations in flight. | 289 // Can only have one of these operations in flight. |
290 DCHECK(select_folder_completion_callback_.is_null()); | 290 DCHECK(select_folder_completion_callback_.is_null()); |
291 DCHECK(failure_callback_.is_null()); | 291 DCHECK(failure_callback_.is_null()); |
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 bool RemoteRootWindowHostWin::IsForegroundWindow() { |
| 299 return ::GetForegroundWindow() == remote_window_; |
| 300 } |
| 301 |
298 Window* RemoteRootWindowHostWin::GetAshWindow() { | 302 Window* RemoteRootWindowHostWin::GetAshWindow() { |
299 return GetRootWindow()->window(); | 303 return GetRootWindow()->window(); |
300 } | 304 } |
301 | 305 |
302 void RemoteRootWindowHostWin::SetDelegate(RootWindowHostDelegate* delegate) { | 306 void RemoteRootWindowHostWin::SetDelegate(RootWindowHostDelegate* delegate) { |
303 delegate_ = delegate; | 307 delegate_ = delegate; |
304 } | 308 } |
305 | 309 |
306 RootWindow* RemoteRootWindowHostWin::GetRootWindow() { | 310 RootWindow* RemoteRootWindowHostWin::GetRootWindow() { |
307 return delegate_->AsRootWindow(); | 311 return delegate_->AsRootWindow(); |
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
610 } | 614 } |
611 | 615 |
612 void RemoteRootWindowHostWin::SetEventFlags(uint32 flags) { | 616 void RemoteRootWindowHostWin::SetEventFlags(uint32 flags) { |
613 if (flags == event_flags_) | 617 if (flags == event_flags_) |
614 return; | 618 return; |
615 event_flags_ = flags; | 619 event_flags_ = flags; |
616 SetVirtualKeyStates(event_flags_); | 620 SetVirtualKeyStates(event_flags_); |
617 } | 621 } |
618 | 622 |
619 } // namespace aura | 623 } // namespace aura |
OLD | NEW |