OLD | NEW |
---|---|
(Empty) | |
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. | |
4 | |
5 #ifndef CHROME_BROWSER_EXTENSIONS_APP_HOST_INSTALLER_H_ | |
6 #define CHROME_BROWSER_EXTENSIONS_APP_HOST_INSTALLER_H_ | |
7 | |
8 #include "base/bind.h" | |
erikwright (departed)
2012/10/03 20:57:07
include callback_fwd.h instead
huangs
2012/10/04 00:53:14
Done.
| |
9 #include "base/win/object_watcher.h" | |
10 #include "base/win/scoped_handle.h" | |
11 | |
12 namespace extensions { | |
13 | |
14 class Extension; | |
15 | |
16 class AppHostInstaller { | |
17 public: | |
18 AppHostInstaller(); | |
19 | |
20 // Returns true if App Host needs to be installed, for the given |extension|. | |
21 static bool IsAppHostInstallRequired(const Extension& extension); | |
22 | |
23 // Installs App Host, then calls |callback| to proceed with installation. | |
24 // |callback| is a function that takes a bool parameter to indicate | |
25 // whether or not the App Host installation was successful. | |
26 void InstallAppHost(const base::Callback<void(bool)>& callback); | |
27 | |
28 private: | |
29 #if defined(OS_WIN) | |
30 base::win::ScopedHandle process_; | |
31 base::win::ObjectWatcher watcher_; | |
32 scoped_ptr<base::win::ObjectWatcher::Delegate> delegate_; | |
erikwright (departed)
2012/10/03 20:57:07
include scoped_ptr
huangs
2012/10/04 00:53:14
Done.
| |
33 #endif | |
34 | |
35 DISALLOW_COPY_AND_ASSIGN(AppHostInstaller); | |
erikwright (departed)
2012/10/03 20:57:07
include basictypes.h
huangs
2012/10/04 00:53:14
Done.
| |
36 }; | |
37 | |
38 } // namespace extensions | |
39 | |
40 #endif // CHROME_BROWSER_EXTENSIONS_APP_HOST_INSTALLER_H_ | |
OLD | NEW |