Index: chrome/browser/extensions/webstore_installer.h |
diff --git a/chrome/browser/extensions/webstore_installer.h b/chrome/browser/extensions/webstore_installer.h |
index 7e48bb82d04497b9f0c9e5fc0c2550d7375f2c46..431f6ddff83d24298fd448d9399ecdcd928d55df 100644 |
--- a/chrome/browser/extensions/webstore_installer.h |
+++ b/chrome/browser/extensions/webstore_installer.h |
@@ -20,6 +20,7 @@ |
#include "content/public/browser/download_item.h" |
#include "content/public/browser/notification_observer.h" |
#include "content/public/browser/notification_registrar.h" |
+#include "content/public/browser/web_contents_observer.h" |
#include "extensions/common/manifest_handlers/shared_module_info.h" |
#include "ui/gfx/image/image_skia.h" |
#include "url/gurl.h" |
@@ -40,10 +41,12 @@ class Extension; |
class Manifest; |
// Downloads and installs extensions from the web store. |
-class WebstoreInstaller :public content::NotificationObserver, |
- public content::DownloadItem::Observer, |
- public base::RefCountedThreadSafe< |
- WebstoreInstaller, content::BrowserThread::DeleteOnUIThread> { |
+class WebstoreInstaller : public content::NotificationObserver, |
+ public content::DownloadItem::Observer, |
+ public content::WebContentsObserver, |
+ public base::RefCountedThreadSafe< |
+ WebstoreInstaller, |
+ content::BrowserThread::DeleteOnUIThread> { |
public: |
enum InstallSource { |
// Inline installs trigger slightly different behavior (install source |
@@ -166,13 +169,13 @@ class WebstoreInstaller :public content::NotificationObserver, |
// Creates a WebstoreInstaller for downloading and installing the extension |
// with the given |id| from the Chrome Web Store. If |delegate| is not NULL, |
// it will be notified when the install succeeds or fails. The installer will |
- // use the specified |controller| to download the extension. Only one |
- // WebstoreInstaller can use a specific controller at any given time. This |
- // also associates the |approval| with this install. |
+ // use the controller obtained from |web_contents| to download the extension. |
+ // Only one WebstoreInstaller can use a specific controller at any given time. |
+ // This also associates the |approval| with this install. |
// Note: the delegate should stay alive until being called back. |
WebstoreInstaller(Profile* profile, |
Delegate* delegate, |
- content::NavigationController* controller, |
+ content::WebContents* web_contents, |
const std::string& id, |
scoped_ptr<Approval> approval, |
InstallSource source); |
@@ -237,7 +240,6 @@ class WebstoreInstaller :public content::NotificationObserver, |
content::NotificationRegistrar registrar_; |
Profile* profile_; |
Delegate* delegate_; |
- content::NavigationController* controller_; |
std::string id_; |
InstallSource install_source_; |
// The DownloadItem is owned by the DownloadManager and is valid from when |