103b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)// Copyright 2014 The Chromium Authors. All rights reserved.
203b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be
303b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)// found in the LICENSE file.
403b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)
503b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)#ifndef ASH_SYSTEM_CHROMEOS_MULTI_USER_MULTI_USER_SWITCH_UTIL_H_
603b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)#define ASH_SYSTEM_CHROMEOS_MULTI_USER_MULTI_USER_SWITCH_UTIL_H_
703b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)
803b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)#include "ash/ash_export.h"
903b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)#include "base/callback.h"
1003b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)
1103b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)namespace ash {
1203b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)
1303b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)// Tries to switch to a new user by first checking if desktop casting / sharing
1403b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)// is going on, and let the user decide if he wants to terminate it or not.
1503b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)// After terminating any desktop sharing operations, the |switch_user| function
1603b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)// will be called.
1703b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)void ASH_EXPORT TrySwitchingActiveUser(
1803b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)    const base::Callback<void()> switch_user);
1903b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)
2003b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)// Terminates the "DesktopCastingWarning" dialog from a unit tests and |accept|s
2103b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)// it. False will be returned if there was no dialog shown.
2203b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)bool ASH_EXPORT TestAndTerminateDesktopCastingWarningForTest(bool accept);
2303b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)
2403b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)}  // namespace chromeos
2503b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)
2603b57e008b61dfcb1fbad3aea950ae0e001748b0Torne (Richard Coles)#endif  // ASH_SYSTEM_CHROMEOS_MULTI_USER_MULTI_USER_SWITCH_UTIL_H_
27