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/native_widget_win.h" | 5 #include "ui/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 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
465 | 465 |
466 void NativeWidgetWin::SetCursor(gfx::NativeCursor cursor) { | 466 void NativeWidgetWin::SetCursor(gfx::NativeCursor cursor) { |
467 message_handler_->SetCursor(cursor); | 467 message_handler_->SetCursor(cursor); |
468 } | 468 } |
469 | 469 |
470 void NativeWidgetWin::ClearNativeFocus() { | 470 void NativeWidgetWin::ClearNativeFocus() { |
471 message_handler_->ClearNativeFocus(); | 471 message_handler_->ClearNativeFocus(); |
472 } | 472 } |
473 | 473 |
474 gfx::Rect NativeWidgetWin::GetWorkAreaBoundsInScreen() const { | 474 gfx::Rect NativeWidgetWin::GetWorkAreaBoundsInScreen() const { |
475 return gfx::Screen::GetDisplayNearestWindow(GetNativeView()).work_area(); | 475 return gfx::Screen::GetNativeScreen()->GetDisplayNearestWindow( |
| 476 GetNativeView()).work_area(); |
476 } | 477 } |
477 | 478 |
478 void NativeWidgetWin::SetInactiveRenderingDisabled(bool value) { | 479 void NativeWidgetWin::SetInactiveRenderingDisabled(bool value) { |
479 } | 480 } |
480 | 481 |
481 Widget::MoveLoopResult NativeWidgetWin::RunMoveLoop( | 482 Widget::MoveLoopResult NativeWidgetWin::RunMoveLoop( |
482 const gfx::Point& drag_offset) { | 483 const gfx::Point& drag_offset) { |
483 return message_handler_->RunMoveLoop(drag_offset) ? | 484 return message_handler_->RunMoveLoop(drag_offset) ? |
484 Widget::MOVE_LOOP_SUCCESSFUL : Widget::MOVE_LOOP_CANCELED; | 485 Widget::MOVE_LOOP_SUCCESSFUL : Widget::MOVE_LOOP_CANCELED; |
485 } | 486 } |
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
906 return false; | 907 return false; |
907 } | 908 } |
908 | 909 |
909 namespace internal { | 910 namespace internal { |
910 | 911 |
911 //////////////////////////////////////////////////////////////////////////////// | 912 //////////////////////////////////////////////////////////////////////////////// |
912 // internal::NativeWidgetPrivate, public: | 913 // internal::NativeWidgetPrivate, public: |
913 | 914 |
914 // static | 915 // static |
915 NativeWidgetPrivate* NativeWidgetPrivate::CreateNativeWidget( | 916 NativeWidgetPrivate* NativeWidgetPrivate::CreateNativeWidget( |
916 internal::NativeWidgetDelegate* delegate) { | 917 internal::NativeWidgetDelegate* delegate, |
| 918 gfx::NativeView parent) { |
917 return new NativeWidgetWin(delegate); | 919 return new NativeWidgetWin(delegate); |
918 } | 920 } |
919 | 921 |
920 // static | 922 // static |
921 NativeWidgetPrivate* NativeWidgetPrivate::GetNativeWidgetForNativeView( | 923 NativeWidgetPrivate* NativeWidgetPrivate::GetNativeWidgetForNativeView( |
922 gfx::NativeView native_view) { | 924 gfx::NativeView native_view) { |
923 return reinterpret_cast<NativeWidgetWin*>( | 925 return reinterpret_cast<NativeWidgetWin*>( |
924 ViewProp::GetValue(native_view, kNativeWidgetKey)); | 926 ViewProp::GetValue(native_view, kNativeWidgetKey)); |
925 } | 927 } |
926 | 928 |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1025 // static | 1027 // static |
1026 bool NativeWidgetPrivate::IsTouchDown() { | 1028 bool NativeWidgetPrivate::IsTouchDown() { |
1027 // This currently isn't necessary because we're not generating touch events on | 1029 // This currently isn't necessary because we're not generating touch events on |
1028 // windows. When we do, this will need to be updated. | 1030 // windows. When we do, this will need to be updated. |
1029 return false; | 1031 return false; |
1030 } | 1032 } |
1031 | 1033 |
1032 } // namespace internal | 1034 } // namespace internal |
1033 | 1035 |
1034 } // namespace views | 1036 } // namespace views |
OLD | NEW |