| 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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 HWND parent_hwnd = NULL; | 133 HWND parent_hwnd = NULL; |
| 134 if (params.parent && params.parent->GetHost()) | 134 if (params.parent && params.parent->GetHost()) |
| 135 parent_hwnd = params.parent->GetHost()->GetAcceleratedWidget(); | 135 parent_hwnd = params.parent->GetHost()->GetAcceleratedWidget(); |
| 136 | 136 |
| 137 message_handler_->set_remove_standard_frame(params.remove_standard_frame); | 137 message_handler_->set_remove_standard_frame(params.remove_standard_frame); |
| 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.force_software_compositing) { |
| 144 ::SetProp(GetAcceleratedWidget(), | 144 ::SetProp(GetAcceleratedWidget(), |
| 145 kForceSoftwareCompositor, | 145 kForceSoftwareCompositor, |
| 146 reinterpret_cast<HANDLE>(true)); | 146 reinterpret_cast<HANDLE>(true)); |
| 147 } | 147 } |
| 148 CreateCompositor(); | 148 CreateCompositor(); |
| 149 OnAcceleratedWidgetAvailable(); | 149 OnAcceleratedWidgetAvailable(); |
| 150 } | 150 } |
| 151 | 151 |
| 152 void DesktopWindowTreeHostWin::OnNativeWidgetCreated( | 152 void DesktopWindowTreeHostWin::OnNativeWidgetCreated( |
| 153 const Widget::InitParams& params) { | 153 const Widget::InitParams& params) { |
| (...skipping 800 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 954 | 954 |
| 955 // static | 955 // static |
| 956 DesktopWindowTreeHost* DesktopWindowTreeHost::Create( | 956 DesktopWindowTreeHost* DesktopWindowTreeHost::Create( |
| 957 internal::NativeWidgetDelegate* native_widget_delegate, | 957 internal::NativeWidgetDelegate* native_widget_delegate, |
| 958 DesktopNativeWidgetAura* desktop_native_widget_aura) { | 958 DesktopNativeWidgetAura* desktop_native_widget_aura) { |
| 959 return new DesktopWindowTreeHostWin(native_widget_delegate, | 959 return new DesktopWindowTreeHostWin(native_widget_delegate, |
| 960 desktop_native_widget_aura); | 960 desktop_native_widget_aura); |
| 961 } | 961 } |
| 962 | 962 |
| 963 } // namespace views | 963 } // namespace views |
| OLD | NEW |