| 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 655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 666 GetWidget()->GetFocusManager()->ProcessAccelerator(accelerator); | 666 GetWidget()->GetFocusManager()->ProcessAccelerator(accelerator); |
| 667 } | 667 } |
| 668 | 668 |
| 669 void NativeWidgetWin::HandleCreate() { | 669 void NativeWidgetWin::HandleCreate() { |
| 670 // TODO(beng): much of this could/should maybe move to HWNDMessageHandler. | 670 // TODO(beng): much of this could/should maybe move to HWNDMessageHandler. |
| 671 | 671 |
| 672 SetNativeWindowProperty(kNativeWidgetKey, this); | 672 SetNativeWindowProperty(kNativeWidgetKey, this); |
| 673 CHECK_EQ(this, GetNativeWidgetForNativeView(GetNativeView())); | 673 CHECK_EQ(this, GetNativeWidgetForNativeView(GetNativeView())); |
| 674 | 674 |
| 675 props_.push_back(ui::SetWindowSupportsRerouteMouseWheel(GetNativeView())); | 675 props_.push_back(ui::SetWindowSupportsRerouteMouseWheel(GetNativeView())); |
| 676 | 676 internal::RootView* root_view = |
| 677 drop_target_ = new DropTargetWin( | 677 static_cast<internal::RootView*>(GetWidget()->GetRootView()); |
| 678 static_cast<internal::RootView*>(GetWidget()->GetRootView())); | 678 drop_target_ = new DropTargetWin(root_view, |
| 679 root_view->GetWidget()->GetNativeView()); |
| 679 | 680 |
| 680 // Windows special DWM window frame requires a special tooltip manager so | 681 // Windows special DWM window frame requires a special tooltip manager so |
| 681 // that window controls in Chrome windows don't flicker when you move your | 682 // that window controls in Chrome windows don't flicker when you move your |
| 682 // mouse over them. See comment in aero_tooltip_manager.h. | 683 // mouse over them. See comment in aero_tooltip_manager.h. |
| 683 Widget* widget = GetWidget()->GetTopLevelWidget(); | 684 Widget* widget = GetWidget()->GetTopLevelWidget(); |
| 684 if (widget && widget->ShouldUseNativeFrame()) { | 685 if (widget && widget->ShouldUseNativeFrame()) { |
| 685 tooltip_manager_.reset(new AeroTooltipManager(GetWidget())); | 686 tooltip_manager_.reset(new AeroTooltipManager(GetWidget())); |
| 686 } else { | 687 } else { |
| 687 tooltip_manager_.reset(new TooltipManagerWin(GetWidget())); | 688 tooltip_manager_.reset(new TooltipManagerWin(GetWidget())); |
| 688 } | 689 } |
| (...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1023 // static | 1024 // static |
| 1024 bool NativeWidgetPrivate::IsTouchDown() { | 1025 bool NativeWidgetPrivate::IsTouchDown() { |
| 1025 // This currently isn't necessary because we're not generating touch events on | 1026 // This currently isn't necessary because we're not generating touch events on |
| 1026 // windows. When we do, this will need to be updated. | 1027 // windows. When we do, this will need to be updated. |
| 1027 return false; | 1028 return false; |
| 1028 } | 1029 } |
| 1029 | 1030 |
| 1030 } // namespace internal | 1031 } // namespace internal |
| 1031 | 1032 |
| 1032 } // namespace views | 1033 } // namespace views |
| OLD | NEW |