| 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/win/metro.h" | 7 #include "base/win/metro.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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 | 138 |
| 139 has_non_client_view_ = Widget::RequiresNonClientView(params.type); | 139 has_non_client_view_ = Widget::RequiresNonClientView(params.type); |
| 140 | 140 |
| 141 gfx::Rect pixel_bounds = gfx::win::DIPToScreenRect(params.bounds); | 141 gfx::Rect pixel_bounds = gfx::win::DIPToScreenRect(params.bounds); |
| 142 message_handler_->Init(parent_hwnd, pixel_bounds); | 142 message_handler_->Init(parent_hwnd, pixel_bounds); |
| 143 if (params.type == Widget::InitParams::TYPE_MENU) { | 143 if (params.type == Widget::InitParams::TYPE_MENU) { |
| 144 ::SetProp(GetAcceleratedWidget(), | 144 ::SetProp(GetAcceleratedWidget(), |
| 145 kForceSoftwareCompositor, | 145 kForceSoftwareCompositor, |
| 146 reinterpret_cast<HANDLE>(true)); | 146 reinterpret_cast<HANDLE>(true)); |
| 147 } | 147 } |
| 148 CreateCompositor(GetAcceleratedWidget()); | 148 CreateCompositor(); |
| 149 OnAcceleratedWidgetAvailable(); |
| 149 } | 150 } |
| 150 | 151 |
| 151 void DesktopWindowTreeHostWin::OnNativeWidgetCreated( | 152 void DesktopWindowTreeHostWin::OnNativeWidgetCreated( |
| 152 const Widget::InitParams& params) { | 153 const Widget::InitParams& params) { |
| 153 // The cursor is not necessarily visible when the root window is created. | 154 // The cursor is not necessarily visible when the root window is created. |
| 154 aura::client::CursorClient* cursor_client = | 155 aura::client::CursorClient* cursor_client = |
| 155 aura::client::GetCursorClient(window()); | 156 aura::client::GetCursorClient(window()); |
| 156 if (cursor_client) | 157 if (cursor_client) |
| 157 is_cursor_visible_ = cursor_client->IsCursorVisible(); | 158 is_cursor_visible_ = cursor_client->IsCursorVisible(); |
| 158 | 159 |
| (...skipping 784 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 943 | 944 |
| 944 // static | 945 // static |
| 945 DesktopWindowTreeHost* DesktopWindowTreeHost::Create( | 946 DesktopWindowTreeHost* DesktopWindowTreeHost::Create( |
| 946 internal::NativeWidgetDelegate* native_widget_delegate, | 947 internal::NativeWidgetDelegate* native_widget_delegate, |
| 947 DesktopNativeWidgetAura* desktop_native_widget_aura) { | 948 DesktopNativeWidgetAura* desktop_native_widget_aura) { |
| 948 return new DesktopWindowTreeHostWin(native_widget_delegate, | 949 return new DesktopWindowTreeHostWin(native_widget_delegate, |
| 949 desktop_native_widget_aura); | 950 desktop_native_widget_aura); |
| 950 } | 951 } |
| 951 | 952 |
| 952 } // namespace views | 953 } // namespace views |
| OLD | NEW |