Don't show supervised user as "already on this device" while they're being imported.
[chromium-blink-merge.git] / ios / web / public / active_state_manager.h
blob88e0d1716183aedb967d105a5450cc45c60abb38
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef IOS_WEB_PUBLIC_ACTIVE_STATE_MANAGER_H_
6 #define IOS_WEB_PUBLIC_ACTIVE_STATE_MANAGER_H_
8 #include "base/macros.h"
10 namespace web {
12 class BrowserState;
14 // Manages the active state associated with a particular BrowserState. Not
15 // thread safe. Must be used only on the main thread.
16 class ActiveStateManager {
17 public:
18 // Sets the active state of the ActiveStateManager. At most one
19 // ActiveStateManager can be active at any given time in the app. A
20 // ActiveStateManager must be made inactive before it is destroyed. It is
21 // valid to call |SetActive(true)| on an already active ActiveStateManager.
22 virtual void SetActive(bool active) = 0;
23 // Returns true if the BrowserState is active.
24 virtual bool IsActive() = 0;
26 protected:
27 virtual ~ActiveStateManager(){};
30 } // namespace web
32 #endif // IOS_WEB_PUBLIC_ACTIVE_STATE_MANAGER_H_