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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 | 55 |
57 // Starts downloading the download URL and opens the downloaded file | 56 // Starts downloading the download URL and opens the downloaded file |
58 // when finished. This method should only be called if |url_for_display| | 57 // when finished. This method should only be called if |url_for_display| |
59 // returns false. | 58 // returns false. |
60 void StartInstalling(bool url_for_display, | 59 void StartInstalling(bool url_for_display, |
61 const GURL& plugin_url, | 60 const GURL& plugin_url, |
62 TabContents* tab_contents); | 61 TabContents* tab_contents); |
63 | 62 |
64 private: | 63 private: |
65 void DownloadStarted(scoped_refptr<content::DownloadManager> dlm, | 64 void DownloadStarted(scoped_refptr<content::DownloadManager> dlm, |
66 content::DownloadId download_id, | 65 content::DownloadItem* item, |
67 net::Error error); | 66 net::Error error); |
68 void DownloadError(const std::string& msg); | 67 void DownloadError(const std::string& msg); |
69 void DownloadCancelled(); | 68 void DownloadCancelled(); |
70 | 69 |
71 InstallerState state_; | 70 InstallerState state_; |
72 ObserverList<PluginInstallerObserver> observers_; | 71 ObserverList<PluginInstallerObserver> observers_; |
73 ObserverList<WeakPluginInstallerObserver> weak_observers_; | 72 ObserverList<WeakPluginInstallerObserver> weak_observers_; |
74 | 73 |
75 DISALLOW_COPY_AND_ASSIGN(PluginInstaller); | 74 DISALLOW_COPY_AND_ASSIGN(PluginInstaller); |
76 }; | 75 }; |
77 | 76 |
78 #endif // CHROME_BROWSER_PLUGINS_PLUGIN_INSTALLER_H_ | 77 #endif // CHROME_BROWSER_PLUGINS_PLUGIN_INSTALLER_H_ |
OLD | NEW |