| Index: ui/gfx/win/hwnd_util.cc
|
| diff --git a/ui/gfx/win/hwnd_util.cc b/ui/gfx/win/hwnd_util.cc
|
| index 41eead48f8d9809b76664cee6d040f27f0efa571..98d71af7ac6641749861ff361fadfe1697354609 100644
|
| --- a/ui/gfx/win/hwnd_util.cc
|
| +++ b/ui/gfx/win/hwnd_util.cc
|
| @@ -6,6 +6,7 @@
|
|
|
| #include "base/i18n/rtl.h"
|
| #include "base/strings/string_util.h"
|
| +#include "base/tracked_objects.h"
|
| #include "base/win/metro.h"
|
| #include "base/win/win_util.h"
|
| #include "ui/gfx/point.h"
|
| @@ -222,8 +223,15 @@ void ShowSystemMenuAtPoint(HWND window, const Point& point) {
|
| if (base::i18n::IsRTL())
|
| flags |= TPM_RIGHTALIGN;
|
| HMENU menu = GetSystemMenu(window, FALSE);
|
| +
|
| + // Use task stopwatch to exclude the time while the context menu is open from
|
| + // the current task, if any.
|
| + tracked_objects::TaskStopwatch stopwatch;
|
| + stopwatch.Start();
|
| const int command =
|
| TrackPopupMenu(menu, flags, point.x(), point.y(), 0, window, NULL);
|
| + stopwatch.Stop();
|
| +
|
| if (command)
|
| SendMessage(window, WM_SYSCOMMAND, command, 0);
|
| }
|
|
|