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

Side by Side Diff: chrome/browser/plugins/plugin_installer.h

Issue 11032052: Merge 160403 - Fix crash when a download is requested for an outdated plugin. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1287/src/
Patch Set: Created 8 years, 2 months 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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"
(...skipping 30 matching lines...) Expand all
41 virtual void OnDownloadDestroyed(content::DownloadItem* download) OVERRIDE; 41 virtual void OnDownloadDestroyed(content::DownloadItem* download) OVERRIDE;
42 42
43 void AddObserver(PluginInstallerObserver* observer); 43 void AddObserver(PluginInstallerObserver* observer);
44 void RemoveObserver(PluginInstallerObserver* observer); 44 void RemoveObserver(PluginInstallerObserver* observer);
45 45
46 void AddWeakObserver(WeakPluginInstallerObserver* observer); 46 void AddWeakObserver(WeakPluginInstallerObserver* observer);
47 void RemoveWeakObserver(WeakPluginInstallerObserver* observer); 47 void RemoveWeakObserver(WeakPluginInstallerObserver* observer);
48 48
49 InstallerState state() const { return state_; } 49 InstallerState state() const { return state_; }
50 50
51 // Opens the download URL in a new tab. This method should only be called if 51 // Opens the download URL in a new tab.
52 // |url_for_display| returns true. 52 void OpenDownloadURL(const GURL& plugin_url,
53 void OpenDownloadURL(bool url_for_display,
54 const GURL& plugin_url,
55 content::WebContents* web_contents); 53 content::WebContents* web_contents);
56 54
57 // Starts downloading the download URL and opens the downloaded file 55 // Starts downloading the download URL and opens the downloaded file
58 // when finished. This method should only be called if |url_for_display| 56 // when finished.
59 // returns false. 57 void StartInstalling(const GURL& plugin_url, TabContents* tab_contents);
60 void StartInstalling(bool url_for_display,
61 const GURL& plugin_url,
62 TabContents* tab_contents);
63 58
64 private: 59 private:
65 void DownloadStarted(scoped_refptr<content::DownloadManager> dlm, 60 void DownloadStarted(scoped_refptr<content::DownloadManager> dlm,
66 content::DownloadId download_id, 61 content::DownloadId download_id,
67 net::Error error); 62 net::Error error);
68 void DownloadError(const std::string& msg); 63 void DownloadError(const std::string& msg);
69 void DownloadCancelled(); 64 void DownloadCancelled();
70 65
71 InstallerState state_; 66 InstallerState state_;
72 ObserverList<PluginInstallerObserver> observers_; 67 ObserverList<PluginInstallerObserver> observers_;
73 ObserverList<WeakPluginInstallerObserver> weak_observers_; 68 ObserverList<WeakPluginInstallerObserver> weak_observers_;
74 69
75 DISALLOW_COPY_AND_ASSIGN(PluginInstaller); 70 DISALLOW_COPY_AND_ASSIGN(PluginInstaller);
76 }; 71 };
77 72
78 #endif // CHROME_BROWSER_PLUGINS_PLUGIN_INSTALLER_H_ 73 #endif // CHROME_BROWSER_PLUGINS_PLUGIN_INSTALLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/plugins/plugin_infobar_delegates.cc ('k') | chrome/browser/plugins/plugin_installer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698