Index: chrome/browser/extensions/app_host_installer.h |
diff --git a/chrome/browser/extensions/app_host_installer.h b/chrome/browser/extensions/app_host_installer.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..6df7339fd872ed7dbf9562f4b5253f49b580bf76 |
--- /dev/null |
+++ b/chrome/browser/extensions/app_host_installer.h |
@@ -0,0 +1,42 @@ |
+// Copyright (c) 2012 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_EXTENSIONS_APP_HOST_INSTALLER_H_ |
+#define CHROME_BROWSER_EXTENSIONS_APP_HOST_INSTALLER_H_ |
+ |
+#include "base/basictypes.h" |
+#include "base/callback_forward.h" |
+#include "base/memory/scoped_ptr.h" |
+#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.
|
+#include "base/win/scoped_handle.h" |
+ |
+namespace extensions { |
+ |
+class Extension; |
+ |
+class AppHostInstaller { |
+ public: |
+ AppHostInstaller(); |
+ |
+ // Returns true if App Host needs to be installed, for the given |extension|. |
+ 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.
|
+ |
+ // Installs App Host, then calls |callback| to proceed with installation. |
+ // |callback| is a function that takes a bool parameter to indicate |
+ // whether or not the App Host installation was successful. |
+ void InstallAppHost(const base::Callback<void(bool)>& callback); |
+ |
+ private: |
+#if defined(OS_WIN) |
+ base::win::ScopedHandle process_; |
+ base::win::ObjectWatcher watcher_; |
+ scoped_ptr<base::win::ObjectWatcher::Delegate> delegate_; |
+#endif |
+ |
+ DISALLOW_COPY_AND_ASSIGN(AppHostInstaller); |
+}; |
+ |
+} // namespace extensions |
+ |
+#endif // CHROME_BROWSER_EXTENSIONS_APP_HOST_INSTALLER_H_ |