| 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_EXTENSIONS_WEBSTORE_INSTALLER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_WEBSTORE_INSTALLER_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_WEBSTORE_INSTALLER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_WEBSTORE_INSTALLER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
| 13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "base/supports_user_data.h" | 14 #include "base/supports_user_data.h" |
| 15 #include "base/values.h" | 15 #include "base/values.h" |
| 16 #include "content/public/browser/browser_thread.h" | 16 #include "content/public/browser/browser_thread.h" |
| 17 #include "content/public/browser/download_id.h" | 17 #include "content/public/browser/download_id.h" |
| 18 #include "content/public/browser/download_item.h" | 18 #include "content/public/browser/download_item.h" |
| 19 #include "content/public/browser/notification_observer.h" | 19 #include "content/public/browser/notification_observer.h" |
| 20 #include "content/public/browser/notification_registrar.h" | 20 #include "content/public/browser/notification_registrar.h" |
| 21 #include "chrome/browser/extensions/extension_install_prompt.h" |
| 21 #include "googleurl/src/gurl.h" | 22 #include "googleurl/src/gurl.h" |
| 22 #include "net/base/net_errors.h" | 23 #include "net/base/net_errors.h" |
| 23 | 24 |
| 24 class FilePath; | 25 class FilePath; |
| 25 class Profile; | 26 class Profile; |
| 26 | 27 |
| 27 namespace content { | 28 namespace content { |
| 28 class NavigationController; | 29 class NavigationController; |
| 29 } | 30 } |
| 30 | 31 |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 | 91 |
| 91 // Whether to skip the install dialog once the extension has been downloaded | 92 // Whether to skip the install dialog once the extension has been downloaded |
| 92 // and unpacked. One reason this can be true is that in the normal webstore | 93 // and unpacked. One reason this can be true is that in the normal webstore |
| 93 // installation, the dialog is shown earlier, before any download is done, | 94 // installation, the dialog is shown earlier, before any download is done, |
| 94 // so there's no need to show it again. | 95 // so there's no need to show it again. |
| 95 bool skip_install_dialog; | 96 bool skip_install_dialog; |
| 96 | 97 |
| 97 // Whether we should record an oauth2 grant for the extensions. | 98 // Whether we should record an oauth2 grant for the extensions. |
| 98 bool record_oauth2_grant; | 99 bool record_oauth2_grant; |
| 99 | 100 |
| 101 // Shows a custom extension install dialog. |
| 102 ExtensionInstallPrompt::ShowDialogCallback custom_install_dialog_callback; |
| 103 |
| 100 private: | 104 private: |
| 101 Approval(); | 105 Approval(); |
| 102 }; | 106 }; |
| 103 | 107 |
| 104 // Gets the Approval associated with the |download|, or NULL if there's none. | 108 // Gets the Approval associated with the |download|, or NULL if there's none. |
| 105 // Note that the Approval is owned by |download|. | 109 // Note that the Approval is owned by |download|. |
| 106 static const Approval* GetAssociatedApproval( | 110 static const Approval* GetAssociatedApproval( |
| 107 const content::DownloadItem& download); | 111 const content::DownloadItem& download); |
| 108 | 112 |
| 109 // Creates a WebstoreInstaller for downloading and installing the extension | 113 // Creates a WebstoreInstaller for downloading and installing the extension |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 // The DownloadItem is owned by the DownloadManager and is valid from when | 169 // The DownloadItem is owned by the DownloadManager and is valid from when |
| 166 // OnDownloadStarted is called (with no error) until OnDownloadDestroyed(). | 170 // OnDownloadStarted is called (with no error) until OnDownloadDestroyed(). |
| 167 content::DownloadItem* download_item_; | 171 content::DownloadItem* download_item_; |
| 168 scoped_ptr<Approval> approval_; | 172 scoped_ptr<Approval> approval_; |
| 169 GURL download_url_; | 173 GURL download_url_; |
| 170 }; | 174 }; |
| 171 | 175 |
| 172 } // namespace extensions | 176 } // namespace extensions |
| 173 | 177 |
| 174 #endif // CHROME_BROWSER_EXTENSIONS_WEBSTORE_INSTALLER_H_ | 178 #endif // CHROME_BROWSER_EXTENSIONS_WEBSTORE_INSTALLER_H_ |
| OLD | NEW |