| Index: chrome/browser/ui/browser_commands.cc
|
| diff --git a/chrome/browser/ui/browser_commands.cc b/chrome/browser/ui/browser_commands.cc
|
| index 9c31248f60e98362f8ad700a218d867416b243d3..d09a5e2e9996a9dbccc227b049281e611a81ac25 100644
|
| --- a/chrome/browser/ui/browser_commands.cc
|
| +++ b/chrome/browser/ui/browser_commands.cc
|
| @@ -681,13 +681,14 @@ void ShareCurrentPage(Browser* browser) {
|
| }
|
|
|
| void Print(Browser* browser) {
|
| + printing::PrintViewManager* print_view_manager =
|
| + printing::PrintViewManager::FromWebContents(
|
| + GetActiveWebContents(browser));
|
| if (browser->profile()->GetPrefs()->GetBoolean(
|
| - prefs::kPrintPreviewDisabled)) {
|
| - GetActiveTabContents(browser)->print_view_manager()->PrintNow();
|
| - } else {
|
| - GetActiveTabContents(browser)->print_view_manager()->
|
| - PrintPreviewNow();
|
| - }
|
| + prefs::kPrintPreviewDisabled))
|
| + print_view_manager->PrintNow();
|
| + else
|
| + print_view_manager->PrintPreviewNow();
|
| }
|
|
|
| bool CanPrint(const Browser* browser) {
|
| @@ -701,8 +702,10 @@ bool CanPrint(const Browser* browser) {
|
| }
|
|
|
| void AdvancedPrint(Browser* browser) {
|
| - GetActiveTabContents(browser)->print_view_manager()->
|
| - AdvancedPrintNow();
|
| + printing::PrintViewManager* print_view_manager =
|
| + printing::PrintViewManager::FromWebContents(
|
| + GetActiveWebContents(browser));
|
| + print_view_manager->AdvancedPrintNow();
|
| }
|
|
|
| bool CanAdvancedPrint(const Browser* browser) {
|
| @@ -713,7 +716,10 @@ bool CanAdvancedPrint(const Browser* browser) {
|
| }
|
|
|
| void PrintToDestination(Browser* browser) {
|
| - GetActiveTabContents(browser)->print_view_manager()->PrintToDestination();
|
| + printing::PrintViewManager* print_view_manager =
|
| + printing::PrintViewManager::FromWebContents(
|
| + GetActiveWebContents(browser));
|
| + print_view_manager->PrintToDestination();
|
| }
|
|
|
| void EmailPageLocation(Browser* browser) {
|
|
|