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_CONFIG_FILE_WATCHER_H_
6 #define REMOTING_HOST_CONFIG_FILE_WATCHER_H_
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "base/files/file_path.h"
11 #include "base/memory/ref_counted.h"
12 #include "remoting/host/config_watcher.h"
15 class SingleThreadTaskRunner
;
20 extern const char kHostConfigSwitchName
[];
21 extern const base::FilePath::CharType kDefaultHostConfigFile
[];
23 class ConfigFileWatcherImpl
;
25 class ConfigFileWatcher
: public ConfigWatcher
{
27 // Creates a configuration file watcher that lives at the |io_task_runner|
28 // thread but posts config file updates on on |main_task_runner|.
30 scoped_refptr
<base::SingleThreadTaskRunner
> main_task_runner
,
31 scoped_refptr
<base::SingleThreadTaskRunner
> io_task_runner
,
32 const base::FilePath
& config_path
);
33 virtual ~ConfigFileWatcher();
35 // Inherited from ConfigWatcher.
36 virtual void Watch(Delegate
* delegate
) OVERRIDE
;
39 scoped_refptr
<ConfigFileWatcherImpl
> impl_
;
41 DISALLOW_COPY_AND_ASSIGN(ConfigFileWatcher
);
44 } // namespace remoting
46 #endif // REMOTING_HOST_CONFIG_FILE_WATCHER_H_