Commit 2b260a21 authored by Greg Thompson's avatar Greg Thompson Committed by Commit Bot

Revert "Win Native Notifications: Fix window activation."

This reverts commit 933cf169.

Reason for revert: Handle leak causing test failures.

Original change's description:
> Win Native Notifications: Fix window activation.
> 
> This fixes the issue with window activation not functioning correctly
> when notifications are activated while Chrome is running but in the
> background.
> 
> Bug: 837796, 734095
> Change-Id: I8eac14403850a13d60e7a50c3c795fed96205d7e
> Reviewed-on: https://chromium-review.googlesource.com/1049984
> Reviewed-by: Greg Thompson <grt@chromium.org>
> Commit-Queue: Finnur Thorarinsson <finnur@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#556955}

TBR=finnur@chromium.org,grt@chromium.org

Change-Id: Ib0e0d132867555f822dc13061b63bca123c16df9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 837796, 734095
Reviewed-on: https://chromium-review.googlesource.com/1051385Reviewed-by: default avatarGreg Thompson <grt@chromium.org>
Commit-Queue: Greg Thompson <grt@chromium.org>
Cr-Commit-Position: refs/heads/master@{#557125}
parent 64d2239b
...@@ -77,8 +77,7 @@ HRESULT NotificationActivator::Activate( ...@@ -77,8 +77,7 @@ HRESULT NotificationActivator::Activate(
SHELLEXECUTEINFO info; SHELLEXECUTEINFO info;
memset(&info, 0, sizeof(info)); memset(&info, 0, sizeof(info));
info.cbSize = sizeof(info); info.cbSize = sizeof(info);
info.fMask = info.fMask = SEE_MASK_NOASYNC | SEE_MASK_FLAG_LOG_USAGE;
SEE_MASK_NOASYNC | SEE_MASK_FLAG_LOG_USAGE | SEE_MASK_NOCLOSEPROCESS;
info.lpFile = chrome_exe_path.value().c_str(); info.lpFile = chrome_exe_path.value().c_str();
info.lpParameters = params.c_str(); info.lpParameters = params.c_str();
info.nShow = SW_SHOWNORMAL; info.nShow = SW_SHOWNORMAL;
...@@ -89,18 +88,6 @@ HRESULT NotificationActivator::Activate( ...@@ -89,18 +88,6 @@ HRESULT NotificationActivator::Activate(
return HRESULT_FROM_WIN32(error_code); return HRESULT_FROM_WIN32(error_code);
} }
if (info.hProcess != NULL) {
DWORD pid = ::GetProcessId(info.hProcess);
if (!::AllowSetForegroundWindow(pid)) {
DWORD error_code = ::GetLastError();
Trace(L"Unable to forward activation privilege; error: 0x%08X\n",
error_code);
return HRESULT_FROM_WIN32(error_code);
}
CloseHandle(info.hProcess);
}
return S_OK; return S_OK;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment