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

Unified Diff: chrome/browser/plugin_installer.h

Issue 8851007: WIP / Do not commit (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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
« no previous file with comments | « chrome/browser/plugin_download_helper.cc ('k') | chrome/browser/plugin_installer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/plugin_installer.h
diff --git a/chrome/browser/plugin_installer.h b/chrome/browser/plugin_installer.h
index 69f4a58ba056d996540cf0a19fcf464df74ef667..66f7b894530d7d54eea518e67a0dddbcb03f9319 100644
--- a/chrome/browser/plugin_installer.h
+++ b/chrome/browser/plugin_installer.h
@@ -6,11 +6,29 @@
#define CHROME_BROWSER_PLUGIN_INSTALLER_H_
#pragma once
+#include "base/observer_list.h"
#include "base/string16.h"
#include "googleurl/src/gurl.h"
+#if defined(OS_WINDOWS)
+#include "base/win/process_monitor.h"
+#endif
+
+class FilePath;
+class PluginInstallerObserver;
+
+namespace net {
+class URLRequestContextGetter;
+}
+
class PluginInstaller {
public:
+ enum State {
+ kStateIdle,
+ kStateDownloading,
+ kStateInstalling,
+ };
+
PluginInstaller(const std::string& identifier,
const GURL& plugin_url,
const GURL& help_url,
@@ -18,6 +36,11 @@ class PluginInstaller {
bool url_for_display);
~PluginInstaller();
+ State state() { return state_; }
+
+ void AddObserver(PluginInstallerObserver* observer);
+ void RemoveObserver(PluginInstallerObserver* observer);
+
// Unique identifier for the plug-in. Should be kept in sync with the
// identifier in plugin_list.cc.
const std::string& identifier() const { return identifier_; }
@@ -35,7 +58,19 @@ class PluginInstaller {
// URL to open when the user clicks on the "Problems installing?" link.
const GURL& help_url() const { return help_url_; }
+ void StartInstalling(net::URLRequestContextGetter* request_context);
+
private:
+ void DidFinishDownload(const FilePath& downloaded_file);
+ void DidFinishInstallation();
+
+ State state_;
+ ObserverList<PluginInstallerObserver> observers_;
+
+#if defined(OS_WINDOWS)
+ base::win::ProcessMonitor installation_process_monitor_;
+#endif
+
std::string identifier_;
GURL plugin_url_;
GURL help_url_;
« no previous file with comments | « chrome/browser/plugin_download_helper.cc ('k') | chrome/browser/plugin_installer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698