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

Unified Diff: chrome/browser/plugin_installer.h

Issue 8664027: Add PluginInstaller to encapsulate information about a missing plug-in. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 9 years, 1 month 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/plugin_installer.h
diff --git a/chrome/browser/plugin_installer.h b/chrome/browser/plugin_installer.h
new file mode 100644
index 0000000000000000000000000000000000000000..e92279cd9d0e6fcc1e839cbd896ac13dec2c9d7c
--- /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.
+ std::string identifier() { return identifier_; }
battre 2011/11/30 14:10:06 const std::string& identifier() const { return ide
Bernhard Bauer 2011/12/01 09:39:25 done (also in other places in this file).
+
+ // Human-readable name of the plug-in.
+ string16 name() { return name_; }
battre 2011/11/30 14:10:06 same here
+
+ // 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() { return url_for_display_; }
battre 2011/11/30 14:10:06 const, also below
+ GURL plugin_url() { return plugin_url_; }
+
+ // URL to open when the user clicks on the "Problems installing?" link.
+ GURL help_url() { 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_

Powered by Google App Engine
This is Rietveld 408576698