Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4420)

Unified Diff: chrome/browser/extensions/app_host_installer.h

Issue 11054006: Make application shortcuts point to app_host.exe, install App Host during app installation. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Moving quick-enable-app-host feature; adding App Host install code for unpacked extension installer. Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..5aacdd47f6686a013ea920f4e5668526e6497a40
--- /dev/null
+++ b/chrome/browser/extensions/app_host_installer.h
@@ -0,0 +1,40 @@
+// 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/bind.h"
erikwright (departed) 2012/10/03 20:57:07 include callback_fwd.h instead
huangs 2012/10/04 00:53:14 Done.
+#include "base/win/object_watcher.h"
+#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);
+
+ // 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_;
erikwright (departed) 2012/10/03 20:57:07 include scoped_ptr
huangs 2012/10/04 00:53:14 Done.
+#endif
+
+ DISALLOW_COPY_AND_ASSIGN(AppHostInstaller);
erikwright (departed) 2012/10/03 20:57:07 include basictypes.h
huangs 2012/10/04 00:53:14 Done.
+};
+
+} // namespace extensions
+
+#endif // CHROME_BROWSER_EXTENSIONS_APP_HOST_INSTALLER_H_
« no previous file with comments | « no previous file | chrome/browser/extensions/app_host_installer.cc » ('j') | chrome/browser/extensions/app_host_installer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698