| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "views/widget/native_widget_win.h" | 5 #include "views/widget/native_widget_win.h" |
| 6 | 6 |
| 7 #include <dwmapi.h> | 7 #include <dwmapi.h> |
| 8 #include <shellapi.h> | 8 #include <shellapi.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 1272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1283 // We should attach IMEs only when we need to input CJK strings. | 1283 // We should attach IMEs only when we need to input CJK strings. |
| 1284 ImmAssociateContextEx(hwnd(), NULL, 0); | 1284 ImmAssociateContextEx(hwnd(), NULL, 0); |
| 1285 | 1285 |
| 1286 // We need to allow the delegate to size its contents since the window may not | 1286 // We need to allow the delegate to size its contents since the window may not |
| 1287 // receive a size notification when its initial bounds are specified at window | 1287 // receive a size notification when its initial bounds are specified at window |
| 1288 // creation time. | 1288 // creation time. |
| 1289 ClientAreaSizeChanged(); | 1289 ClientAreaSizeChanged(); |
| 1290 | 1290 |
| 1291 #if defined(VIEWS_COMPOSITOR) | 1291 #if defined(VIEWS_COMPOSITOR) |
| 1292 if (View::get_use_acceleration_when_possible()) { | 1292 if (View::get_use_acceleration_when_possible()) { |
| 1293 if (Widget::compositor_factory()) { | 1293 if (ui::Compositor::compositor_factory()) { |
| 1294 compositor_ = (*Widget::compositor_factory())(); | 1294 compositor_ = (*Widget::compositor_factory())(this); |
| 1295 } else { | 1295 } else { |
| 1296 CRect window_rect; | 1296 CRect window_rect; |
| 1297 GetClientRect(&window_rect); | 1297 GetClientRect(&window_rect); |
| 1298 compositor_ = ui::Compositor::Create(this, | 1298 compositor_ = ui::Compositor::Create(this, |
| 1299 hwnd(), | 1299 hwnd(), |
| 1300 gfx::Size(window_rect.Width(), window_rect.Height())); | 1300 gfx::Size(window_rect.Width(), window_rect.Height())); |
| 1301 } | 1301 } |
| 1302 if (compositor_.get()) { | 1302 if (compositor_.get()) { |
| 1303 delegate_->AsWidget()->GetRootView()->SetPaintToLayer(true); | 1303 delegate_->AsWidget()->GetRootView()->SetPaintToLayer(true); |
| 1304 compositor_->SetRootLayer(delegate_->AsWidget()->GetRootView()->layer()); | 1304 compositor_->SetRootLayer(delegate_->AsWidget()->GetRootView()->layer()); |
| (...skipping 1320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2625 return (GetKeyState(VK_LBUTTON) & 0x80) || | 2625 return (GetKeyState(VK_LBUTTON) & 0x80) || |
| 2626 (GetKeyState(VK_RBUTTON) & 0x80) || | 2626 (GetKeyState(VK_RBUTTON) & 0x80) || |
| 2627 (GetKeyState(VK_MBUTTON) & 0x80) || | 2627 (GetKeyState(VK_MBUTTON) & 0x80) || |
| 2628 (GetKeyState(VK_XBUTTON1) & 0x80) || | 2628 (GetKeyState(VK_XBUTTON1) & 0x80) || |
| 2629 (GetKeyState(VK_XBUTTON2) & 0x80); | 2629 (GetKeyState(VK_XBUTTON2) & 0x80); |
| 2630 } | 2630 } |
| 2631 | 2631 |
| 2632 } // namespace internal | 2632 } // namespace internal |
| 2633 | 2633 |
| 2634 } // namespace views | 2634 } // namespace views |
| OLD | NEW |