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

Unified Diff: chrome/browser/printing/print_preview_tab_controller.cc

Issue 10905301: Switch CoreTabHelper to use WebContentsUserData. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 3 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
Index: chrome/browser/printing/print_preview_tab_controller.cc
diff --git a/chrome/browser/printing/print_preview_tab_controller.cc b/chrome/browser/printing/print_preview_tab_controller.cc
index 62ee0e64869d63a13a3806aa9087fa6dde61bedc..736da9e293f5f4b356a6ffff805811047cc46442 100644
--- a/chrome/browser/printing/print_preview_tab_controller.cc
+++ b/chrome/browser/printing/print_preview_tab_controller.cc
@@ -165,8 +165,10 @@ class PrintPreviewWebContentDelegate : public WebDialogWebContentsDelegate,
const NativeWebKeyboardEvent& event) OVERRIDE;
// Overridden from CoreTabHelperDelegate:
- virtual bool CanReloadContents(TabContents* source) const OVERRIDE;
- virtual bool CanSaveContents(TabContents* source) const OVERRIDE;
+ virtual bool CanReloadContents(
+ content::WebContents* web_contents) const OVERRIDE;
+ virtual bool CanSaveContents(
+ content::WebContents* web_contents) const OVERRIDE;
private:
TabContents* tab_;
@@ -183,12 +185,12 @@ PrintPreviewWebContentDelegate::PrintPreviewWebContentDelegate(
PrintPreviewWebContentDelegate::~PrintPreviewWebContentDelegate() {}
bool PrintPreviewWebContentDelegate::CanReloadContents(
- TabContents* source) const {
+ content::WebContents* web_contents) const {
return false;
}
bool PrintPreviewWebContentDelegate::CanSaveContents(
- TabContents* source) const {
+ content::WebContents* web_contents) const {
return false;
}
@@ -434,7 +436,8 @@ TabContents* PrintPreviewTabController::CreatePrintPreviewTab(
initiator_tab);
TabContents* preview_tab = constrained_delegate->tab();
EnableInternalPDFPluginForTab(preview_tab);
- preview_tab->core_tab_helper()->set_delegate(pp_wcd);
+ CoreTabHelper::FromWebContents(preview_tab->web_contents())->
+ set_delegate(pp_wcd);
// Add an entry to the map.
preview_tab_map_[preview_tab] = initiator_tab;
« no previous file with comments | « chrome/browser/prerender/prerender_manager.cc ('k') | chrome/browser/tab_contents/render_view_context_menu.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698