| 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 "base/string_util.h" | 10 #include "base/string_util.h" |
| (...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 539 } | 539 } |
| 540 | 540 |
| 541 gfx::NativeView NativeWidgetWin::GetNativeView() const { | 541 gfx::NativeView NativeWidgetWin::GetNativeView() const { |
| 542 return WindowImpl::hwnd(); | 542 return WindowImpl::hwnd(); |
| 543 } | 543 } |
| 544 | 544 |
| 545 gfx::NativeWindow NativeWidgetWin::GetNativeWindow() const { | 545 gfx::NativeWindow NativeWidgetWin::GetNativeWindow() const { |
| 546 return WindowImpl::hwnd(); | 546 return WindowImpl::hwnd(); |
| 547 } | 547 } |
| 548 | 548 |
| 549 Widget* NativeWidgetWin::GetTopLevelWidget() { |
| 550 NativeWidgetPrivate* native_widget = GetTopLevelNativeWidget(GetNativeView()); |
| 551 return native_widget ? native_widget->GetWidget() : NULL; |
| 552 } |
| 553 |
| 549 const ui::Compositor* NativeWidgetWin::GetCompositor() const { | 554 const ui::Compositor* NativeWidgetWin::GetCompositor() const { |
| 550 return compositor_.get(); | 555 return compositor_.get(); |
| 551 } | 556 } |
| 552 | 557 |
| 553 ui::Compositor* NativeWidgetWin::GetCompositor() { | 558 ui::Compositor* NativeWidgetWin::GetCompositor() { |
| 554 return compositor_.get(); | 559 return compositor_.get(); |
| 555 } | 560 } |
| 556 | 561 |
| 557 void NativeWidgetWin::MarkLayerDirty() { | 562 void NativeWidgetWin::MarkLayerDirty() { |
| 558 } | 563 } |
| (...skipping 1959 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2518 return (GetKeyState(VK_LBUTTON) & 0x80) || | 2523 return (GetKeyState(VK_LBUTTON) & 0x80) || |
| 2519 (GetKeyState(VK_RBUTTON) & 0x80) || | 2524 (GetKeyState(VK_RBUTTON) & 0x80) || |
| 2520 (GetKeyState(VK_MBUTTON) & 0x80) || | 2525 (GetKeyState(VK_MBUTTON) & 0x80) || |
| 2521 (GetKeyState(VK_XBUTTON1) & 0x80) || | 2526 (GetKeyState(VK_XBUTTON1) & 0x80) || |
| 2522 (GetKeyState(VK_XBUTTON2) & 0x80); | 2527 (GetKeyState(VK_XBUTTON2) & 0x80); |
| 2523 } | 2528 } |
| 2524 | 2529 |
| 2525 } // namespace internal | 2530 } // namespace internal |
| 2526 | 2531 |
| 2527 } // namespace views | 2532 } // namespace views |
| OLD | NEW |