blob: 77c6ab245d70cdc39995cc8ba61cbe5d9666fd71 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_REMOTING_REMOTING_OPTIONS_HANDLER_H_
#define CHROME_BROWSER_REMOTING_REMOTING_OPTIONS_HANDLER_H_
#include "base/basictypes.h"
#include "chrome/browser/service/service_process_control.h"
class WebUI;
namespace remoting {
// Remoting options handler is responsinble for showing correct status
// of the chromoting host in the preferences. It listens to the
// messages from the service process (by registering MessageHandler
// callback in the ServiceProcessControl) and updates current status
// as neccessary.
class RemotingOptionsHandler : public ServiceProcessControl::MessageHandler {
public:
RemotingOptionsHandler();
virtual ~RemotingOptionsHandler();
void Init(WebUI* web_ui);
// ServiceProcessControl::MessageHandler interface.
virtual void OnRemotingHostInfo(
const remoting::ChromotingHostInfo& host_info);
private:
void SetStatus(bool enabled, bool host_enabled, bool host_configured,
const std::string& login);
WebUI* web_ui_;
ServiceProcessControl* process_control_;
DISALLOW_COPY_AND_ASSIGN(RemotingOptionsHandler);
};
} // namespace remoting
#endif // CHROME_BROWSER_REMOTING_REMOTING_OPTIONS_HANDLER_H_
|