OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_PLUGIN_INSTALLER_H_ |
| 6 #define CHROME_BROWSER_PLUGIN_INSTALLER_H_ |
| 7 #pragma once |
| 8 |
| 9 #include "base/string16.h" |
| 10 #include "googleurl/src/gurl.h" |
| 11 |
| 12 class PluginInstaller { |
| 13 public: |
| 14 PluginInstaller(const std::string& identifier, |
| 15 const GURL& plugin_url, |
| 16 const GURL& help_url, |
| 17 const string16& name, |
| 18 bool url_for_display); |
| 19 ~PluginInstaller(); |
| 20 |
| 21 // Unique identifier for the plug-in. Should be kept in sync with the |
| 22 // identifier in plugin_list.cc. |
| 23 const std::string& identifier() const { return identifier_; } |
| 24 |
| 25 // Human-readable name of the plug-in. |
| 26 const string16& name() const { return name_; } |
| 27 |
| 28 // If |url_for_display| is false, |plugin_url| is the URL of the download page |
| 29 // for the plug-in, which should be opened in a new tab. If it is true, |
| 30 // |plugin_url| is the URL of the plug-in installer binary, which can be |
| 31 // directly downloaded. |
| 32 bool url_for_display() const { return url_for_display_; } |
| 33 const GURL& plugin_url() const { return plugin_url_; } |
| 34 |
| 35 // URL to open when the user clicks on the "Problems installing?" link. |
| 36 const GURL& help_url() const { return help_url_; } |
| 37 |
| 38 private: |
| 39 std::string identifier_; |
| 40 GURL plugin_url_; |
| 41 GURL help_url_; |
| 42 string16 name_; |
| 43 bool url_for_display_; |
| 44 |
| 45 DISALLOW_COPY_AND_ASSIGN(PluginInstaller); |
| 46 }; |
| 47 |
| 48 #endif // CHROME_BROWSER_PLUGIN_INSTALLER_H_ |
OLD | NEW |