1 // Copyright (c) 2012 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 REMOTING_HOST_CURTAIN_MODE_H_
6 #define REMOTING_HOST_CURTAIN_MODE_H_
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "base/memory/ref_counted.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "base/memory/weak_ptr.h"
15 class SingleThreadTaskRunner;
20 class ClientSessionControl;
24 virtual ~CurtainMode() {}
26 // Creates a platform-specific curtain mode implementation object that
27 // "curtains" the current session making sure it is not accessible from
28 // the local console. |client_session_control| can be used to drop
29 // the connection in the case if the session re-connects to the local console
31 static scoped_ptr<CurtainMode> Create(
32 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner,
33 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner,
34 base::WeakPtr<ClientSessionControl> client_session_control);
36 // Activates the curtain mode. Returns true if successful.
37 virtual bool Activate() = 0;
43 DISALLOW_COPY_AND_ASSIGN(CurtainMode);
46 } // namespace remoting