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/basictypes.h" | |
9 #include "base/callback_forward.h" | |
10 #include "base/memory/scoped_ptr.h" | |
11 #include "base/win/object_watcher.h" | |
erikwright (departed)
2012/10/04 01:28:16
You'll need #if's for base/win/*
benwells
2012/10/04 07:53:01
You also don't need to include scoped_ptr unless i
huangs
2012/10/04 22:56:42
Done.
huangs
2012/10/04 22:56:42
Done.
| |
12 #include "base/win/scoped_handle.h" | |
13 | |
14 namespace extensions { | |
15 | |
16 class Extension; | |
17 | |
18 class AppHostInstaller { | |
19 public: | |
20 AppHostInstaller(); | |
21 | |
22 // Returns true if App Host needs to be installed, for the given |extension|. | |
23 static bool IsAppHostInstallRequired(const Extension& extension); | |
benwells
2012/10/04 07:53:01
If these functions need to be called on the FILE t
huangs
2012/10/04 22:56:42
Done.
| |
24 | |
25 // Installs App Host, then calls |callback| to proceed with installation. | |
26 // |callback| is a function that takes a bool parameter to indicate | |
27 // whether or not the App Host installation was successful. | |
28 void InstallAppHost(const base::Callback<void(bool)>& callback); | |
29 | |
30 private: | |
31 #if defined(OS_WIN) | |
32 base::win::ScopedHandle process_; | |
33 base::win::ObjectWatcher watcher_; | |
34 scoped_ptr<base::win::ObjectWatcher::Delegate> delegate_; | |
35 #endif | |
36 | |
37 DISALLOW_COPY_AND_ASSIGN(AppHostInstaller); | |
38 }; | |
39 | |
40 } // namespace extensions | |
41 | |
42 #endif // CHROME_BROWSER_EXTENSIONS_APP_HOST_INSTALLER_H_ | |
OLD | NEW |