| 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 "chrome/browser/renderer_host/render_widget_host_view_win.h" | 5 #include "chrome/browser/renderer_host/render_widget_host_view_win.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/gfx/gdi_util.h" | 8 #include "base/gfx/gdi_util.h" |
| 9 #include "base/gfx/rect.h" | 9 #include "base/gfx/rect.h" |
| 10 #include "base/histogram.h" | 10 #include "base/histogram.h" |
| (...skipping 792 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 803 case WM_MOUSEMOVE: | 803 case WM_MOUSEMOVE: |
| 804 case WM_MOUSELEAVE: | 804 case WM_MOUSELEAVE: |
| 805 case WM_RBUTTONDOWN: { | 805 case WM_RBUTTONDOWN: { |
| 806 // Give the WebContents first crack at the message. It may want to | 806 // Give the WebContents first crack at the message. It may want to |
| 807 // prevent forwarding to the renderer if some higher level browser | 807 // prevent forwarding to the renderer if some higher level browser |
| 808 // functionality is invoked. | 808 // functionality is invoked. |
| 809 if (SendMessage(GetParent(), message, wparam, lparam) != 0) | 809 if (SendMessage(GetParent(), message, wparam, lparam) != 0) |
| 810 return 1; | 810 return 1; |
| 811 } | 811 } |
| 812 } | 812 } |
| 813 |
| 814 // WebKit does not update its IME status when a user clicks a mouse button |
| 815 // to change the input focus onto a popup menu. As a workaround, we finish |
| 816 // an ongoing composition every time when we click a left button. |
| 817 if (message == WM_LBUTTONDOWN) |
| 818 ime_input_.CleanupComposition(m_hWnd); |
| 813 } | 819 } |
| 814 | 820 |
| 815 ForwardMouseEventToRenderer(message, wparam, lparam); | 821 ForwardMouseEventToRenderer(message, wparam, lparam); |
| 816 return 0; | 822 return 0; |
| 817 } | 823 } |
| 818 | 824 |
| 819 LRESULT RenderWidgetHostViewWin::OnKeyEvent(UINT message, WPARAM wparam, | 825 LRESULT RenderWidgetHostViewWin::OnKeyEvent(UINT message, WPARAM wparam, |
| 820 LPARAM lparam, BOOL& handled) { | 826 LPARAM lparam, BOOL& handled) { |
| 821 handled = TRUE; | 827 handled = TRUE; |
| 822 | 828 |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1075 // WM_LBUTTONDOWN. | 1081 // WM_LBUTTONDOWN. |
| 1076 SetFocus(); | 1082 SetFocus(); |
| 1077 } | 1083 } |
| 1078 } | 1084 } |
| 1079 | 1085 |
| 1080 void RenderWidgetHostViewWin::ShutdownHost() { | 1086 void RenderWidgetHostViewWin::ShutdownHost() { |
| 1081 shutdown_factory_.RevokeAll(); | 1087 shutdown_factory_.RevokeAll(); |
| 1082 render_widget_host_->Shutdown(); | 1088 render_widget_host_->Shutdown(); |
| 1083 // Do not touch any members at this point, |this| has been deleted. | 1089 // Do not touch any members at this point, |this| has been deleted. |
| 1084 } | 1090 } |
| OLD | NEW |