Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1493)

Unified Diff: content/browser/renderer_host/legacy_render_widget_host_win.cc

Issue 374283002: Remove the WM_SYSCOMMAND handling from the LegacyRenderWidgetHostHWND class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/renderer_host/legacy_render_widget_host_win.h ('k') | ui/base/win/window_event_target.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/legacy_render_widget_host_win.cc
diff --git a/content/browser/renderer_host/legacy_render_widget_host_win.cc b/content/browser/renderer_host/legacy_render_widget_host_win.cc
index d0604195f1ce6f7a065bb8246d2c54aa3e481ae9..9c2e1a2e512ccf646dec9ce48388b4e5b44a3e6b 100644
--- a/content/browser/renderer_host/legacy_render_widget_host_win.cc
+++ b/content/browser/renderer_host/legacy_render_widget_host_win.cc
@@ -224,6 +224,15 @@ LRESULT LegacyRenderWidgetHostHWND::OnMouseRange(UINT message,
ret = GetWindowEventTarget(GetParent())->HandleMouseMessage(
message, w_param, l_param, &msg_handled);
handled = msg_handled;
+ // If the parent did not handle non client mouse messages, we call
+ // DefWindowProc on the message with the parent window handle. This
+ // ensures that WM_SYSCOMMAND is generated for the parent and we are
+ // out of the picture.
+ if (!handled &&
+ (message >= WM_NCMOUSEMOVE && message <= WM_NCXBUTTONDBLCLK)) {
+ ret = ::DefWindowProc(GetParent(), message, w_param, l_param);
+ handled = TRUE;
+ }
}
return ret;
}
@@ -362,18 +371,4 @@ LRESULT LegacyRenderWidgetHostHWND::OnSize(UINT message,
return 0;
}
-LRESULT LegacyRenderWidgetHostHWND::OnSysCommand(UINT message,
- WPARAM w_param,
- LPARAM l_param) {
- LRESULT ret = 0;
- if (GetWindowEventTarget(GetParent())) {
- bool msg_handled = false;
- ret = GetWindowEventTarget(
- GetParent())->HandleSysCommand(message, w_param, l_param,
- &msg_handled);
- SetMsgHandled(msg_handled);
- }
- return ret;
-}
-
} // namespace content
« no previous file with comments | « content/browser/renderer_host/legacy_render_widget_host_win.h ('k') | ui/base/win/window_event_target.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698