| 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/views/widget/desktop_aura/desktop_window_tree_host_win.h" | 5 #include "ui/views/widget/desktop_aura/desktop_window_tree_host_win.h" |
| 6 | 6 |
| 7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
| 8 #include "third_party/skia/include/core/SkPath.h" | 8 #include "third_party/skia/include/core/SkPath.h" |
| 9 #include "third_party/skia/include/core/SkRegion.h" | 9 #include "third_party/skia/include/core/SkRegion.h" |
| 10 #include "ui/aura/client/aura_constants.h" | 10 #include "ui/aura/client/aura_constants.h" |
| (...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 474 } | 474 } |
| 475 | 475 |
| 476 bool DesktopWindowTreeHostWin::ShouldUpdateWindowTransparency() const { | 476 bool DesktopWindowTreeHostWin::ShouldUpdateWindowTransparency() const { |
| 477 return true; | 477 return true; |
| 478 } | 478 } |
| 479 | 479 |
| 480 bool DesktopWindowTreeHostWin::ShouldUseDesktopNativeCursorManager() const { | 480 bool DesktopWindowTreeHostWin::ShouldUseDesktopNativeCursorManager() const { |
| 481 return true; | 481 return true; |
| 482 } | 482 } |
| 483 | 483 |
| 484 std::vector<DesktopWindowTreeHost*> |
| 485 DesktopWindowTreeHostWin::GetOwnedTopLevelHosts() const { |
| 486 std::vector<DesktopWindowTreeHost*> hosts; |
| 487 std::vector<HWND> child_windows = message_handler_->GetOwnedWindows(); |
| 488 for (HWND hwnd : child_windows) { |
| 489 if (aura::WindowTreeHost* host = GetForAcceleratedWidget(hwnd)) { |
| 490 if (DesktopWindowTreeHostWin* target = |
| 491 host->window()->GetProperty(kDesktopWindowTreeHostKey)) { |
| 492 hosts.push_back(target); |
| 493 } |
| 494 } |
| 495 } |
| 496 return hosts; |
| 497 } |
| 498 |
| 484 //////////////////////////////////////////////////////////////////////////////// | 499 //////////////////////////////////////////////////////////////////////////////// |
| 485 // DesktopWindowTreeHostWin, WindowTreeHost implementation: | 500 // DesktopWindowTreeHostWin, WindowTreeHost implementation: |
| 486 | 501 |
| 487 ui::EventSource* DesktopWindowTreeHostWin::GetEventSource() { | 502 ui::EventSource* DesktopWindowTreeHostWin::GetEventSource() { |
| 488 return this; | 503 return this; |
| 489 } | 504 } |
| 490 | 505 |
| 491 gfx::AcceleratedWidget DesktopWindowTreeHostWin::GetAcceleratedWidget() { | 506 gfx::AcceleratedWidget DesktopWindowTreeHostWin::GetAcceleratedWidget() { |
| 492 return message_handler_->hwnd(); | 507 return message_handler_->hwnd(); |
| 493 } | 508 } |
| (...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 991 | 1006 |
| 992 // static | 1007 // static |
| 993 DesktopWindowTreeHost* DesktopWindowTreeHost::Create( | 1008 DesktopWindowTreeHost* DesktopWindowTreeHost::Create( |
| 994 internal::NativeWidgetDelegate* native_widget_delegate, | 1009 internal::NativeWidgetDelegate* native_widget_delegate, |
| 995 DesktopNativeWidgetAura* desktop_native_widget_aura) { | 1010 DesktopNativeWidgetAura* desktop_native_widget_aura) { |
| 996 return new DesktopWindowTreeHostWin(native_widget_delegate, | 1011 return new DesktopWindowTreeHostWin(native_widget_delegate, |
| 997 desktop_native_widget_aura); | 1012 desktop_native_widget_aura); |
| 998 } | 1013 } |
| 999 | 1014 |
| 1000 } // namespace views | 1015 } // namespace views |
| OLD | NEW |