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

Unified Diff: ui/views/win/hwnd_message_handler.cc

Issue 879153002: Instrumenting more of WM_ message processing for jank (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 | « chrome/browser/ui/omnibox/omnibox_edit_model.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/win/hwnd_message_handler.cc
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
index d23127df8ce817655dea9c7e55947a880a4789a5..3fcbd8b981782a9858f1d862e9b01ebae6928343 100644
--- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc
@@ -1450,8 +1450,16 @@ LRESULT HWNDMessageHandler::OnCreate(CREATESTRUCT* create_struct) {
// creation time.
ClientAreaSizeChanged();
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/440919 is fixed.
+ tracked_objects::ScopedTracker tracking_profile7(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION("440919 HWNDMessageHandler::OnCreate7"));
+
delegate_->HandleCreate();
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/440919 is fixed.
+ tracked_objects::ScopedTracker tracking_profile8(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION("440919 HWNDMessageHandler::OnCreate8"));
+
WTSRegisterSessionNotification(hwnd(), NOTIFY_FOR_THIS_SESSION);
// TODO(beng): move more of NWW::OnCreate here.
@@ -2775,10 +2783,21 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
// so use the weak ptr to check if destruction occured or not.
base::WeakPtr<HWNDMessageHandler> ref(weak_factory_.GetWeakPtr());
bool handled = delegate_->HandleMouseEvent(event);
+
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/440919 is fixed.
+ tracked_objects::ScopedTracker tracking_profile8(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "440919 HWNDMessageHandler::HandleMouseEventInternal8"));
+
if (!ref.get())
return 0;
if (!handled && message == WM_NCLBUTTONDOWN && w_param != HTSYSMENU &&
delegate_->IsUsingCustomFrame()) {
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/440919 is fixed.
+ tracked_objects::ScopedTracker tracking_profile9(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "440919 HWNDMessageHandler::HandleMouseEventInternal9"));
+
// TODO(msw): Eliminate undesired painting, or re-evaluate this workaround.
// DefWindowProc for WM_NCLBUTTONDOWN does weird non-client painting, so we
// need to call it inside a ScopedRedrawLock. This may cause other negative
@@ -2787,8 +2806,14 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
handled = true;
}
- if (ref.get())
+ if (ref.get()) {
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/440919 is fixed.
+ tracked_objects::ScopedTracker tracking_profile10(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "440919 HWNDMessageHandler::HandleMouseEventInternal10"));
+
SetMsgHandled(handled);
+ }
return 0;
}
« no previous file with comments | « chrome/browser/ui/omnibox/omnibox_edit_model.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698