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 846 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
857 desktop_native_widget_aura_->input_method_event_filter()-> | 857 desktop_native_widget_aura_->input_method_event_filter()-> |
858 input_method()->OnInputLocaleChanged(); | 858 input_method()->OnInputLocaleChanged(); |
859 } | 859 } |
860 | 860 |
861 bool DesktopWindowTreeHostWin::HandlePaintAccelerated( | 861 bool DesktopWindowTreeHostWin::HandlePaintAccelerated( |
862 const gfx::Rect& invalid_rect) { | 862 const gfx::Rect& invalid_rect) { |
863 return native_widget_delegate_->OnNativeWidgetPaintAccelerated(invalid_rect); | 863 return native_widget_delegate_->OnNativeWidgetPaintAccelerated(invalid_rect); |
864 } | 864 } |
865 | 865 |
866 void DesktopWindowTreeHostWin::HandlePaint(gfx::Canvas* canvas) { | 866 void DesktopWindowTreeHostWin::HandlePaint(gfx::Canvas* canvas) { |
867 compositor()->ScheduleRedrawRect(gfx::Rect()); | 867 // It appears possible to get WM_PAINT after WM_DESTROY. |
| 868 if (compositor()) |
| 869 compositor()->ScheduleRedrawRect(gfx::Rect()); |
868 } | 870 } |
869 | 871 |
870 bool DesktopWindowTreeHostWin::HandleTooltipNotify(int w_param, | 872 bool DesktopWindowTreeHostWin::HandleTooltipNotify(int w_param, |
871 NMHDR* l_param, | 873 NMHDR* l_param, |
872 LRESULT* l_result) { | 874 LRESULT* l_result) { |
873 return tooltip_ && tooltip_->HandleNotify(w_param, l_param, l_result); | 875 return tooltip_ && tooltip_->HandleNotify(w_param, l_param, l_result); |
874 } | 876 } |
875 | 877 |
876 void DesktopWindowTreeHostWin::HandleTooltipMouseMove(UINT message, | 878 void DesktopWindowTreeHostWin::HandleTooltipMouseMove(UINT message, |
877 WPARAM w_param, | 879 WPARAM w_param, |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
951 | 953 |
952 // static | 954 // static |
953 DesktopWindowTreeHost* DesktopWindowTreeHost::Create( | 955 DesktopWindowTreeHost* DesktopWindowTreeHost::Create( |
954 internal::NativeWidgetDelegate* native_widget_delegate, | 956 internal::NativeWidgetDelegate* native_widget_delegate, |
955 DesktopNativeWidgetAura* desktop_native_widget_aura) { | 957 DesktopNativeWidgetAura* desktop_native_widget_aura) { |
956 return new DesktopWindowTreeHostWin(native_widget_delegate, | 958 return new DesktopWindowTreeHostWin(native_widget_delegate, |
957 desktop_native_widget_aura); | 959 desktop_native_widget_aura); |
958 } | 960 } |
959 | 961 |
960 } // namespace views | 962 } // namespace views |
OLD | NEW |