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

Unified Diff: chrome/browser/ui/webui/print_preview/print_preview_handler.cc

Issue 10388214: Make cloud print dialog creation function not use browser list, instead obtain profile and parent w… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 7 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
« no previous file with comments | « chrome/browser/printing/printing_message_filter.cc ('k') | chrome/common/print_messages.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/print_preview_handler.cc
===================================================================
--- chrome/browser/ui/webui/print_preview/print_preview_handler.cc (revision 138829)
+++ chrome/browser/ui/webui/print_preview/print_preview_handler.cc (working copy)
@@ -47,6 +47,7 @@
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
+#include "content/public/browser/web_contents_view.h"
#include "content/public/browser/web_contents_delegate.h"
#include "content/public/browser/web_ui.h"
#include "printing/backend/print_backend.h"
@@ -547,7 +548,11 @@
}
void PrintPreviewHandler::HandleSignin(const ListValue* /*args*/) {
+ gfx::NativeWindow modal_parent =
+ web_ui()->GetWebContents()->GetView()->GetTopLevelNativeWindow();
print_dialog_cloud::CreateCloudPrintSigninDialog(
+ web_ui()->GetWebContents()->GetBrowserContext(),
+ modal_parent,
base::Bind(&PrintPreviewHandler::OnSigninComplete, AsWeakPtr()));
}
@@ -566,11 +571,16 @@
return;
}
DCHECK_GT(data->size(), 0U);
- print_dialog_cloud::CreatePrintDialogForBytes(data,
+
+ gfx::NativeWindow modal_parent =
+ web_ui()->GetWebContents()->GetView()->GetTopLevelNativeWindow();
+ print_dialog_cloud::CreatePrintDialogForBytes(
+ web_ui()->GetWebContents()->GetBrowserContext(),
+ modal_parent,
+ data,
string16(print_preview_ui->initiator_tab_title()),
string16(),
- std::string("application/pdf"),
- true);
+ std::string("application/pdf"));
// Once the cloud print dialog comes up we're no longer in a background
// printing situation. Close the print preview.
« no previous file with comments | « chrome/browser/printing/printing_message_filter.cc ('k') | chrome/common/print_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698