| Index: chrome/browser/printing/print_preview_message_handler.cc
|
| ===================================================================
|
| --- chrome/browser/printing/print_preview_message_handler.cc (revision 110066)
|
| +++ chrome/browser/printing/print_preview_message_handler.cc (working copy)
|
| @@ -13,16 +13,13 @@
|
| #include "chrome/browser/browser_process.h"
|
| #include "chrome/browser/printing/print_job_manager.h"
|
| #include "chrome/browser/printing/print_preview_tab_controller.h"
|
| -#include "chrome/browser/printing/print_view_manager.h"
|
| #include "chrome/browser/printing/printer_query.h"
|
| #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
|
| -#include "chrome/browser/ui/webui/print_preview_handler.h"
|
| #include "chrome/browser/ui/webui/print_preview_ui.h"
|
| #include "chrome/common/print_messages.h"
|
| #include "content/browser/renderer_host/render_view_host.h"
|
| #include "content/browser/tab_contents/tab_contents.h"
|
| #include "content/public/browser/browser_thread.h"
|
| -#include "content/public/common/content_restriction.h"
|
| #include "printing/page_size_margins.h"
|
| #include "printing/print_job_constants.h"
|
|
|
| @@ -181,8 +178,6 @@
|
| return;
|
| }
|
|
|
| - print_preview_tab->print_view_manager()->OverrideTitle(tab_contents());
|
| -
|
| // TODO(joth): This seems like a good match for using RefCountedStaticMemory
|
| // to avoid the memory copy, but the SetPrintPreviewData call chain below
|
| // needs updating to accept the RefCountedMemory* base class.
|
| @@ -252,10 +247,16 @@
|
| return handled;
|
| }
|
|
|
| -void PrintPreviewMessageHandler::DidStartLoading() {
|
| - if (tab_contents()->delegate() &&
|
| - PrintPreviewTabController::IsPrintPreviewTab(tab_contents_wrapper())) {
|
| - tab_contents()->SetContentRestrictions(content::CONTENT_RESTRICTION_PRINT);
|
| +void PrintPreviewMessageHandler::NavigateToPendingEntry(
|
| + const GURL& url,
|
| + NavigationController::ReloadType reload_type) {
|
| + TabContentsWrapper* tab = tab_contents_wrapper();
|
| + TabContentsWrapper* preview_tab = GetPrintPreviewTab();
|
| + if (tab == preview_tab) {
|
| + // Cloud print sign-in reloads the page.
|
| + DCHECK(PrintPreviewTabController::IsPrintPreviewURL(url));
|
| + DCHECK_EQ(NavigationController::RELOAD, reload_type);
|
| + return;
|
| }
|
| }
|
|
|
|
|