| 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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 gfx::Rect pixel_bounds = | 129 gfx::Rect pixel_bounds = |
| 130 display::win::ScreenWin::DIPToScreenRect(nullptr, params.bounds); | 130 display::win::ScreenWin::DIPToScreenRect(nullptr, params.bounds); |
| 131 message_handler_->Init(parent_hwnd, pixel_bounds); | 131 message_handler_->Init(parent_hwnd, pixel_bounds); |
| 132 if (params.force_software_compositing) { | 132 if (params.force_software_compositing) { |
| 133 ::SetProp(GetAcceleratedWidget(), | 133 ::SetProp(GetAcceleratedWidget(), |
| 134 kForceSoftwareCompositor, | 134 kForceSoftwareCompositor, |
| 135 reinterpret_cast<HANDLE>(true)); | 135 reinterpret_cast<HANDLE>(true)); |
| 136 } | 136 } |
| 137 CreateCompositor(); | 137 CreateCompositor(); |
| 138 OnAcceleratedWidgetAvailable(); | 138 OnAcceleratedWidgetAvailable(); |
| 139 InitHost(); |
| 140 window()->Show(); |
| 139 } | 141 } |
| 140 | 142 |
| 141 void DesktopWindowTreeHostWin::OnNativeWidgetCreated( | 143 void DesktopWindowTreeHostWin::OnNativeWidgetCreated( |
| 142 const Widget::InitParams& params) { | 144 const Widget::InitParams& params) { |
| 143 // The cursor is not necessarily visible when the root window is created. | 145 // The cursor is not necessarily visible when the root window is created. |
| 144 aura::client::CursorClient* cursor_client = | 146 aura::client::CursorClient* cursor_client = |
| 145 aura::client::GetCursorClient(window()); | 147 aura::client::GetCursorClient(window()); |
| 146 if (cursor_client) | 148 if (cursor_client) |
| 147 is_cursor_visible_ = cursor_client->IsCursorVisible(); | 149 is_cursor_visible_ = cursor_client->IsCursorVisible(); |
| 148 | 150 |
| (...skipping 838 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 987 | 989 |
| 988 // static | 990 // static |
| 989 DesktopWindowTreeHost* DesktopWindowTreeHost::Create( | 991 DesktopWindowTreeHost* DesktopWindowTreeHost::Create( |
| 990 internal::NativeWidgetDelegate* native_widget_delegate, | 992 internal::NativeWidgetDelegate* native_widget_delegate, |
| 991 DesktopNativeWidgetAura* desktop_native_widget_aura) { | 993 DesktopNativeWidgetAura* desktop_native_widget_aura) { |
| 992 return new DesktopWindowTreeHostWin(native_widget_delegate, | 994 return new DesktopWindowTreeHostWin(native_widget_delegate, |
| 993 desktop_native_widget_aura); | 995 desktop_native_widget_aura); |
| 994 } | 996 } |
| 995 | 997 |
| 996 } // namespace views | 998 } // namespace views |
| OLD | NEW |