| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_PLUGINS_PLUGIN_INSTALLER_H_ | 5 #ifndef CHROME_BROWSER_PLUGINS_PLUGIN_INSTALLER_H_ |
| 6 #define CHROME_BROWSER_PLUGINS_PLUGIN_INSTALLER_H_ | 6 #define CHROME_BROWSER_PLUGINS_PLUGIN_INSTALLER_H_ |
| 7 | 7 |
| 8 #include "base/observer_list.h" | 8 #include "base/observer_list.h" |
| 9 #include "base/string16.h" | 9 #include "base/string16.h" |
| 10 #include "base/version.h" | 10 #include "base/version.h" |
| 11 #include "chrome/browser/plugins/plugin_metadata.h" | 11 #include "chrome/browser/plugins/plugin_metadata.h" |
| 12 #include "content/public/browser/download_id.h" | |
| 13 #include "content/public/browser/download_item.h" | 12 #include "content/public/browser/download_item.h" |
| 14 #include "googleurl/src/gurl.h" | 13 #include "googleurl/src/gurl.h" |
| 15 #include "net/base/net_errors.h" | 14 #include "net/base/net_errors.h" |
| 16 | 15 |
| 17 class FilePath; | 16 class FilePath; |
| 18 class PluginInstallerObserver; | 17 class PluginInstallerObserver; |
| 19 class TabContents; | 18 class TabContents; |
| 20 class WeakPluginInstallerObserver; | 19 class WeakPluginInstallerObserver; |
| 21 | 20 |
| 22 namespace content { | 21 namespace content { |
| (...skipping 28 matching lines...) Expand all Loading... |
| 51 // Opens the download URL in a new tab. | 50 // Opens the download URL in a new tab. |
| 52 void OpenDownloadURL(const GURL& plugin_url, | 51 void OpenDownloadURL(const GURL& plugin_url, |
| 53 content::WebContents* web_contents); | 52 content::WebContents* web_contents); |
| 54 | 53 |
| 55 // Starts downloading the download URL and opens the downloaded file | 54 // Starts downloading the download URL and opens the downloaded file |
| 56 // when finished. | 55 // when finished. |
| 57 void StartInstalling(const GURL& plugin_url, TabContents* tab_contents); | 56 void StartInstalling(const GURL& plugin_url, TabContents* tab_contents); |
| 58 | 57 |
| 59 private: | 58 private: |
| 60 void DownloadStarted(scoped_refptr<content::DownloadManager> dlm, | 59 void DownloadStarted(scoped_refptr<content::DownloadManager> dlm, |
| 61 content::DownloadId download_id, | 60 content::DownloadItem* item, |
| 62 net::Error error); | 61 net::Error error); |
| 63 void DownloadError(const std::string& msg); | 62 void DownloadError(const std::string& msg); |
| 64 void DownloadCancelled(); | 63 void DownloadCancelled(); |
| 65 | 64 |
| 66 InstallerState state_; | 65 InstallerState state_; |
| 67 ObserverList<PluginInstallerObserver> observers_; | 66 ObserverList<PluginInstallerObserver> observers_; |
| 68 ObserverList<WeakPluginInstallerObserver> weak_observers_; | 67 ObserverList<WeakPluginInstallerObserver> weak_observers_; |
| 69 | 68 |
| 70 DISALLOW_COPY_AND_ASSIGN(PluginInstaller); | 69 DISALLOW_COPY_AND_ASSIGN(PluginInstaller); |
| 71 }; | 70 }; |
| 72 | 71 |
| 73 #endif // CHROME_BROWSER_PLUGINS_PLUGIN_INSTALLER_H_ | 72 #endif // CHROME_BROWSER_PLUGINS_PLUGIN_INSTALLER_H_ |
| OLD | NEW |