Chromium Code Reviews| Index: content/browser/tab_contents/tab_contents.cc |
| =================================================================== |
| --- content/browser/tab_contents/tab_contents.cc (revision 81013) |
| +++ content/browser/tab_contents/tab_contents.cc (working copy) |
| @@ -14,6 +14,7 @@ |
| #include "base/string_util.h" |
| #include "base/time.h" |
| #include "base/utf_string_conversions.h" |
| +#include "chrome/app/chrome_command_ids.h" |
| #include "chrome/browser/blocked_content_container.h" |
| #include "chrome/browser/browser_process.h" |
| #include "chrome/browser/browser_shutdown.h" |
| @@ -52,6 +53,8 @@ |
| #include "chrome/browser/translate/page_translated_details.h" |
| #include "chrome/browser/ui/app_modal_dialogs/message_box_handler.h" |
| #include "chrome/browser/ui/browser_dialogs.h" |
| +#include "chrome/browser/ui/download/download_tab_helper.h" |
| +#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
|
jam
2011/04/15 17:58:44
TabContents doesn't know about TabContentsWrapper,
|
| #include "chrome/common/bindings_policy.h" |
| #include "chrome/common/chrome_constants.h" |
| #include "chrome/common/chrome_switches.h" |
| @@ -407,6 +410,7 @@ |
| OnUpdateContentRestrictions) |
| IPC_MESSAGE_HANDLER(ViewHostMsg_PDFHasUnsupportedFeature, |
| OnPDFHasUnsupportedFeature) |
| + IPC_MESSAGE_HANDLER(ViewHostMsg_SaveAs, OnSaveAs) |
| IPC_MESSAGE_HANDLER(ViewHostMsg_GoToEntryAtOffset, OnGoToEntryAtOffset) |
| IPC_MESSAGE_HANDLER(ViewHostMsg_PageContents, OnPageContents) |
| IPC_MESSAGE_HANDLER(ViewHostMsg_PageTranslated, OnPageTranslated) |
| @@ -1375,6 +1379,12 @@ |
| PDFHasUnsupportedFeature(this); |
| } |
| +void TabContents::OnSaveAs() { |
| + TabContentsWrapper* wrapper = |
| + TabContentsWrapper::GetCurrentWrapperForContents(this); |
| + wrapper->download_tab_helper()->OnSavePage(); |
| +} |
| + |
| // Notifies the RenderWidgetHost instance about the fact that the page is |
| // loading, or done loading and calls the base implementation. |
| void TabContents::SetIsLoading(bool is_loading, |