chrome/test/mini_installer/chrome_helper.py
def GetWindowHandles(process_ids):
    """Returns a list of handles of windows owned by processes in |process_ids|.

    Args:
        process_ids: A list of process IDs.

    Returns:
        A list of handles of windows owned by processes in |process_ids|.
    """
    hwnds = []

    def EnumerateWindowCallback(hwnd, _):
        _, found_process_id = win32process.GetWindowThreadProcessId(hwnd)
        if found_process_id in process_ids and win32gui.IsWindowVisible(hwnd):
            hwnds.append(hwnd)

    # Enumerate all the top-level windows and call the callback with the hwnd as
    # the first parameter.
    win32gui.EnumWindows(EnumerateWindowCallback, None)
    return hwnds
Returns a list of handles of windows owned by processes in |process_ids|.

    Args:
        process_ids: A list of process IDs.

    Returns:
        A list of handles of windows owned by processes in |process_ids|.
    
Returns a list of handles of windows owned by processes in |process_ids|.
Returns a list of handles of windows owned by processes in |process_ids| .
def GetWindowHandles(process_ids):
    hwnds = []
    def EnumerateWindowCallback(hwnd, _):
        _, found_process_id = win32process.GetWindowThreadProcessId(hwnd)
        if found_process_id in process_ids and win32gui.IsWindowVisible(hwnd):
            hwnds.append(hwnd)
    win32gui.EnumWindows(EnumerateWindowCallback, None)
    return hwnds
def GetWindowHandles ( process_ids ) : hwnds = [ ] def EnumerateWindowCallback ( hwnd , _ ) : _ , found_process_id = win32process . GetWindowThreadProcessId ( hwnd ) if found_process_id in process_ids and win32gui . IsWindowVisible ( hwnd ) : hwnds . append ( hwnd ) win32gui . EnumWindows ( EnumerateWindowCallback , None ) return hwnds
Returns a list of handles of windows owned by processes in |process_ids|.
Returns a list of handles of windows owned by processes in |process_ids| .
"""Returns a list of handles of windows owned by processes in |process_ids|.

    Args:
        process_ids: A list of process IDs.

    Returns:
        A list of handles of windows owned by processes in |process_ids|.
    """ # Enumerate all the top-level windows and call the callback with the hwnd as # the first parameter.
A list of handles of windows owned by processes in |process_ids|.
A list of handles of windows owned by processes in |process_ids| .
process_ids
A list of process IDs.
A list of process IDs .