OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/widget_win.h" | 5 #include "views/widget/widget_win.h" |
6 | 6 |
7 #include "app/gfx/canvas.h" | 7 #include "app/gfx/canvas.h" |
8 #include "app/gfx/path.h" | 8 #include "app/gfx/path.h" |
9 #include "app/l10n_util_win.h" | 9 #include "app/l10n_util_win.h" |
10 #include "app/win_util.h" | 10 #include "app/win_util.h" |
(...skipping 895 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
906 LRESULT WidgetWin::OnWndProc(UINT message, WPARAM w_param, LPARAM l_param) { | 906 LRESULT WidgetWin::OnWndProc(UINT message, WPARAM w_param, LPARAM l_param) { |
907 HWND window = hwnd(); | 907 HWND window = hwnd(); |
908 LRESULT result = 0; | 908 LRESULT result = 0; |
909 | 909 |
910 // First allow messages sent by child controls to be processed directly by | 910 // First allow messages sent by child controls to be processed directly by |
911 // their associated views. If such a view is present, it will handle the | 911 // their associated views. If such a view is present, it will handle the |
912 // message *instead of* this WidgetWin. | 912 // message *instead of* this WidgetWin. |
913 if (ProcessNativeControlMessage(message, w_param, l_param, &result)) | 913 if (ProcessNativeControlMessage(message, w_param, l_param, &result)) |
914 return result; | 914 return result; |
915 | 915 |
916 // Otherwise we handle everything else. | 916 result = base::WindowImpl::OnWndProc(message, w_param, l_param); |
917 if (!ProcessWindowMessage(window, message, w_param, l_param, result)) | |
918 result = DefWindowProc(window, message, w_param, l_param); | |
919 if (message == WM_NCDESTROY) | |
920 OnFinalMessage(window); | |
921 if (message == WM_ACTIVATE) | 917 if (message == WM_ACTIVATE) |
922 PostProcessActivateMessage(this, LOWORD(w_param)); | 918 PostProcessActivateMessage(this, LOWORD(w_param)); |
923 return result; | 919 return result; |
924 } | 920 } |
925 | 921 |
926 // static | 922 // static |
927 void WidgetWin::PostProcessActivateMessage(WidgetWin* widget, | 923 void WidgetWin::PostProcessActivateMessage(WidgetWin* widget, |
928 int activation_state) { | 924 int activation_state) { |
929 if (!widget->focus_manager_.get()) { | 925 if (!widget->focus_manager_.get()) { |
930 NOTREACHED(); | 926 NOTREACHED(); |
(...skipping 16 matching lines...) Expand all Loading... |
947 WidgetWin* popup = new WidgetWin; | 943 WidgetWin* popup = new WidgetWin; |
948 popup->set_window_style(WS_POPUP); | 944 popup->set_window_style(WS_POPUP); |
949 popup->set_window_ex_style(WS_EX_LAYERED | WS_EX_TOOLWINDOW | | 945 popup->set_window_ex_style(WS_EX_LAYERED | WS_EX_TOOLWINDOW | |
950 WS_EX_TRANSPARENT | | 946 WS_EX_TRANSPARENT | |
951 l10n_util::GetExtendedTooltipStyles()); | 947 l10n_util::GetExtendedTooltipStyles()); |
952 popup->set_delete_on_destroy(delete_on_destroy); | 948 popup->set_delete_on_destroy(delete_on_destroy); |
953 return popup; | 949 return popup; |
954 } | 950 } |
955 | 951 |
956 } // namespace views | 952 } // namespace views |
OLD | NEW |