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 <algorithm> | 5 #include <algorithm> |
6 | 6 |
7 #include "base/histogram.h" | 7 #include "base/histogram.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/win_util.h" | 9 #include "base/win_util.h" |
10 #include "chrome/browser/renderer_host/render_widget_host_view_win.h" | 10 #include "chrome/browser/renderer_host/render_widget_host_view_win.h" |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 // FocusManager::OnActivate attempts to restore the focused view, it | 77 // FocusManager::OnActivate attempts to restore the focused view, it |
78 // needs to be called last so the focus it is setting does not get | 78 // needs to be called last so the focus it is setting does not get |
79 // overridden. | 79 // overridden. |
80 LRESULT result = CallWindowProc(original_handler, window, WM_ACTIVATE, | 80 LRESULT result = CallWindowProc(original_handler, window, WM_ACTIVATE, |
81 wParam, lParam); | 81 wParam, lParam); |
82 if (!focus_manager->OnPostActivate(window, | 82 if (!focus_manager->OnPostActivate(window, |
83 LOWORD(wParam), HIWORD(wParam))) | 83 LOWORD(wParam), HIWORD(wParam))) |
84 return 0; | 84 return 0; |
85 return result; | 85 return result; |
86 } | 86 } |
87 case WM_IME_CHAR: | |
88 // Issue 7707: A rich-edit control may crash when it receives a | |
89 // WM_IME_CHAR message while it is processing a WM_IME_COMPOSITION | |
90 // message. Since view controls don't need WM_IME_CHAR messages, | |
91 // we prevent WM_IME_CHAR messages from being dispatched to view | |
92 // controls via the CallWindowProc() call. | |
93 return 0; | |
94 default: | 87 default: |
95 break; | 88 break; |
96 } | 89 } |
97 } | 90 } |
98 return CallWindowProc(original_handler, window, message, wParam, lParam); | 91 return CallWindowProc(original_handler, window, message, wParam, lParam); |
99 } | 92 } |
100 | 93 |
101 // FocusManager ----------------------------------------------------- | 94 // FocusManager ----------------------------------------------------- |
102 | 95 |
103 // static | 96 // static |
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
735 std::find(focus_change_listeners_.begin(), focus_change_listeners_.end(), | 728 std::find(focus_change_listeners_.begin(), focus_change_listeners_.end(), |
736 listener); | 729 listener); |
737 if (place == focus_change_listeners_.end()) { | 730 if (place == focus_change_listeners_.end()) { |
738 NOTREACHED() << "Removing a listener that isn't registered."; | 731 NOTREACHED() << "Removing a listener that isn't registered."; |
739 return; | 732 return; |
740 } | 733 } |
741 focus_change_listeners_.erase(place); | 734 focus_change_listeners_.erase(place); |
742 } | 735 } |
743 | 736 |
744 } // namespace views | 737 } // namespace views |
OLD | NEW |