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

Unified Diff: chrome/browser/ui/webui/print_preview_ui.cc

Issue 9003014: Replace WebUI::tab_contents() with web_contents() and switch all users to use web_contents.h inst... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years 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 | « chrome/browser/ui/webui/print_preview_ui.h ('k') | chrome/browser/ui/webui/profiler_ui.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/print_preview_ui.cc
===================================================================
--- chrome/browser/ui/webui/print_preview_ui.cc (revision 116011)
+++ chrome/browser/ui/webui/print_preview_ui.cc (working copy)
@@ -21,10 +21,11 @@
#include "chrome/browser/ui/webui/print_preview_data_source.h"
#include "chrome/browser/ui/webui/print_preview_handler.h"
#include "chrome/common/print_messages.h"
-#include "content/browser/tab_contents/tab_contents.h"
+#include "content/public/browser/web_contents.h"
#include "printing/page_size_margins.h"
#include "printing/print_job_constants.h"
+using content::WebContents;
using printing::PageSizeMargins;
namespace {
@@ -71,7 +72,7 @@
} // namespace
-PrintPreviewUI::PrintPreviewUI(TabContents* contents)
+PrintPreviewUI::PrintPreviewUI(WebContents* contents)
: ConstrainedHtmlUI(contents),
initial_preview_start_time_(base::TimeTicks::Now()),
handler_(NULL),
@@ -135,10 +136,10 @@
void PrintPreviewUI::SetSourceIsModifiable(
TabContentsWrapper* print_preview_tab,
bool source_is_modifiable) {
- if (!print_preview_tab || !print_preview_tab->tab_contents()->GetWebUI())
+ if (!print_preview_tab || !print_preview_tab->web_contents()->GetWebUI())
return;
PrintPreviewUI* print_preview_ui = static_cast<PrintPreviewUI*>(
- print_preview_tab->tab_contents()->GetWebUI());
+ print_preview_tab->web_contents()->GetWebUI());
print_preview_ui->source_is_modifiable_ = source_is_modifiable;
}
@@ -165,7 +166,7 @@
void PrintPreviewUI::OnPrintPreviewTabClosed() {
TabContentsWrapper* preview_tab =
- TabContentsWrapper::GetCurrentWrapperForContents(tab_contents());
+ TabContentsWrapper::GetCurrentWrapperForContents(web_contents());
printing::BackgroundPrintingManager* background_printing_manager =
g_browser_process->background_printing_manager();
if (background_printing_manager->HasPrintPreviewTab(preview_tab))
@@ -175,7 +176,7 @@
void PrintPreviewUI::OnInitiatorTabClosed() {
TabContentsWrapper* preview_tab =
- TabContentsWrapper::GetCurrentWrapperForContents(tab_contents());
+ TabContentsWrapper::GetCurrentWrapperForContents(web_contents());
printing::BackgroundPrintingManager* background_printing_manager =
g_browser_process->background_printing_manager();
if (background_printing_manager->HasPrintPreviewTab(preview_tab))
@@ -281,7 +282,7 @@
void PrintPreviewUI::OnHidePreviewTab() {
TabContentsWrapper* preview_tab =
- TabContentsWrapper::GetCurrentWrapperForContents(tab_contents());
+ TabContentsWrapper::GetCurrentWrapperForContents(web_contents());
printing::BackgroundPrintingManager* background_printing_manager =
g_browser_process->background_printing_manager();
if (background_printing_manager->HasPrintPreviewTab(preview_tab))
« no previous file with comments | « chrome/browser/ui/webui/print_preview_ui.h ('k') | chrome/browser/ui/webui/profiler_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698