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

Unified Diff: chrome/browser/download/save_package.h

Issue 6374009: Get rid of a few more interfaces from RenderViewHostDelegate that aren't need... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/download/save_package.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/save_package.h
===================================================================
--- chrome/browser/download/save_package.h (revision 72441)
+++ chrome/browser/download/save_package.h (working copy)
@@ -16,8 +16,8 @@
#include "base/hash_tables.h"
#include "base/ref_counted.h"
#include "base/task.h"
-#include "chrome/browser/renderer_host/render_view_host_delegate.h"
#include "chrome/browser/shell_dialogs.h"
+#include "chrome/browser/tab_contents/web_navigation_observer.h"
#include "googleurl/src/gurl.h"
class SaveFileManager;
@@ -54,7 +54,7 @@
// by the SavePackage. SaveItems are created when a user initiates a page
// saving job, and exist for the duration of one tab's life time.
class SavePackage : public base::RefCountedThreadSafe<SavePackage>,
- public RenderViewHostDelegate::Save,
+ public WebNavigationObserver,
public SelectFileDialog::Listener {
public:
enum SavePackageType {
@@ -128,22 +128,6 @@
void GetSaveInfo();
- // RenderViewHostDelegate::Save ----------------------------------------------
-
- // Process all of the current page's savable links of subresources, resources
- // referrers and frames (including the main frame and subframes) from the
- // render view host.
- virtual void OnReceivedSavableResourceLinksForCurrentPage(
- const std::vector<GURL>& resources_list,
- const std::vector<GURL>& referrers_list,
- const std::vector<GURL>& frames_list);
-
- // Process the serialized html content data of a specified web page
- // gotten from render process.
- virtual void OnReceivedSerializedHtmlData(const GURL& frame_url,
- const std::string& data,
- int32 status);
-
// Statics -------------------------------------------------------------------
// Used to disable prompting the user for a directory/filename of the saved
@@ -179,6 +163,9 @@
void SaveNextFile(bool process_all_remainder_items);
void DoSavingProcess();
+ // WebNavigationObserver implementation.
+ virtual bool OnMessageReceived(const IPC::Message& message);
+
// Create a file name based on the response from the server.
bool GenerateFileName(const std::string& disposition,
const GURL& url,
@@ -205,7 +192,16 @@
bool can_save_as_complete);
void ContinueSave(const FilePath& final_name, int index);
+ void OnReceivedSavableResourceLinksForCurrentPage(
+ const std::vector<GURL>& resources_list,
+ const std::vector<GURL>& referrers_list,
+ const std::vector<GURL>& frames_list);
+ void OnReceivedSerializedHtmlData(const GURL& frame_url,
+ const std::string& data,
+ int32 status);
+
+
typedef base::hash_map<std::string, SaveItem*> SaveUrlItemMap;
// in_progress_items_ is map of all saving job in in-progress state.
SaveUrlItemMap in_progress_items_;
« no previous file with comments | « no previous file | chrome/browser/download/save_package.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698