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

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: 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 4526b168700bd3b4918099269875ea5ab7629e67..f491da040be1a828559147ef11333fab35ca57db 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;
}
@@ -432,7 +434,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;

Powered by Google App Engine
This is Rietveld 408576698