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

Issue 6962051: Support PDF print preview in ChromeFrame by opening the preview in a new Chrome popup window. (Closed)

Created:
9 years, 6 months ago by ananta
Modified:
9 years, 6 months ago
Reviewers:
amit
CC:
chromium-reviews
Visibility:
Public.

Description

Support PDF print preview in ChromeFrame by opening the preview in a new Chrome popup window. Fixes bug http://code.google.com/p/chromium/issues/detail?id=83661 BUG=83661 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=87554

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+14 lines, -2 lines) Patch
M chrome/browser/printing/print_preview_tab_controller.cc View 1 chunk +14 lines, -2 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
ananta
9 years, 6 months ago (2011-06-01 23:31:03 UTC) #1
amit
9 years, 6 months ago (2011-06-01 23:36:54 UTC) #2
lgtm

On Wed, Jun 1, 2011 at 4:31 PM, <ananta@chromium.org> wrote:

> Reviewers: amit,
>
> Description:
> Support PDF print preview in ChromeFrame by opening the preview in a new
> Chrome
> popup window.
>
> Fixes bug http://code.google.com/p/chromium/issues/detail?id=83661
>
> BUG=83661
>
> Please review this at http://codereview.chromium.org/6962051/
>
> SVN Base: svn://svn.chromium.org/chrome/trunk/src/
>
> Affected files:
>  M     chrome/browser/printing/print_preview_tab_controller.cc
>
>
> Index: chrome/browser/printing/print_preview_tab_controller.cc
> ===================================================================
> --- chrome/browser/printing/print_preview_tab_controller.cc     (revision
> 87490)
> +++ chrome/browser/printing/print_preview_tab_controller.cc     (working
> copy)
> @@ -170,14 +170,26 @@
>     TabContents* initiator_tab) {
>   Browser* current_browser = BrowserList::FindBrowserWithID(
>       initiator_tab->controller().window_id().id());
> -  if (!current_browser)
> -    return NULL;
> +  if (!current_browser) {
> +    if (initiator_tab->delegate()->IsExternalTabContainer()) {
> +      current_browser = Browser::CreateForType(Browser::TYPE_POPUP,
> +                                               initiator_tab->profile());
> +      if (!current_browser) {
> +        NOTREACHED() << "Failed to create popup browser window";
> +        return NULL;
> +      }
> +    } else {
> +      return NULL;
> +    }
> +  }
>
>   // Add a new tab next to initiator tab.
>   browser::NavigateParams params(current_browser,
>                                  GURL(chrome::kChromeUIPrintURL),
>                                  PageTransition::LINK);
>   params.disposition = NEW_FOREGROUND_TAB;
> +  if (initiator_tab->delegate()->IsExternalTabContainer())
> +    params.disposition = NEW_POPUP;
>   params.tabstrip_index = current_browser->tabstrip_model()->
>       GetWrapperIndex(initiator_tab) + 1;
>   browser::Navigate(&params);
>
>
>

Powered by Google App Engine
This is Rietveld 408576698