summaryrefslogtreecommitdiffstats
path: root/chrome/browser/plugin_installer.h
diff options
context:
space:
mode:
authorbauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-02 02:28:12 +0000
committerbauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-02 02:28:12 +0000
commitf99c87d5c20b9ece5b77fe0230f9c10bd2f48dcf (patch)
treefe41e293ce8e9c804626637ea4d09506a290d299 /chrome/browser/plugin_installer.h
parentaa8f1cc58dcac3fe2b5688dabdd45d52c240721a (diff)
downloadchromium_src-f99c87d5c20b9ece5b77fe0230f9c10bd2f48dcf.zip
chromium_src-f99c87d5c20b9ece5b77fe0230f9c10bd2f48dcf.tar.gz
chromium_src-f99c87d5c20b9ece5b77fe0230f9c10bd2f48dcf.tar.bz2
Add PluginInstaller to encapsulate information about a missing plug-in, and add a separate help URL for each plug-in.
TBR=arv@chromium.org BUG=62079,102987 TEST=none Review URL: http://codereview.chromium.org/8664027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112610 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/plugin_installer.h')
-rw-r--r--chrome/browser/plugin_installer.h48
1 files changed, 48 insertions, 0 deletions
diff --git a/chrome/browser/plugin_installer.h b/chrome/browser/plugin_installer.h
new file mode 100644
index 0000000..69f4a58
--- /dev/null
+++ b/chrome/browser/plugin_installer.h
@@ -0,0 +1,48 @@
+// Copyright (c) 2011 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_PLUGIN_INSTALLER_H_
+#define CHROME_BROWSER_PLUGIN_INSTALLER_H_
+#pragma once
+
+#include "base/string16.h"
+#include "googleurl/src/gurl.h"
+
+class PluginInstaller {
+ public:
+ PluginInstaller(const std::string& identifier,
+ const GURL& plugin_url,
+ const GURL& help_url,
+ const string16& name,
+ bool url_for_display);
+ ~PluginInstaller();
+
+ // 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_; }
+
+ // Human-readable name of the plug-in.
+ const string16& name() const { return name_; }
+
+ // If |url_for_display| is false, |plugin_url| is the URL of the download page
+ // for the plug-in, which should be opened in a new tab. If it is true,
+ // |plugin_url| is the URL of the plug-in installer binary, which can be
+ // directly downloaded.
+ bool url_for_display() const { return url_for_display_; }
+ const GURL& plugin_url() const { return plugin_url_; }
+
+ // URL to open when the user clicks on the "Problems installing?" link.
+ const GURL& help_url() const { return help_url_; }
+
+ private:
+ std::string identifier_;
+ GURL plugin_url_;
+ GURL help_url_;
+ string16 name_;
+ bool url_for_display_;
+
+ DISALLOW_COPY_AND_ASSIGN(PluginInstaller);
+};
+
+#endif // CHROME_BROWSER_PLUGIN_INSTALLER_H_