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

Unified Diff: chrome/browser/printing/printer_query.cc

Issue 27451002: Printing: Keep track of WebContents lifetime for the native printing UI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 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/printer_query.h ('k') | chrome/browser/printing/printing_message_filter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/printing/printer_query.cc
diff --git a/chrome/browser/printing/printer_query.cc b/chrome/browser/printing/printer_query.cc
index 6935975bbcbbe82fe129011bf4da48998b102c6b..03198e235be03856a8d43824eaacc913bc81cb91 100644
--- a/chrome/browser/printing/printer_query.cc
+++ b/chrome/browser/printing/printer_query.cc
@@ -10,6 +10,7 @@
#include "base/threading/thread_restrictions.h"
#include "base/values.h"
#include "chrome/browser/printing/print_job_worker.h"
+#include "chrome/browser/printing/printing_ui_web_contents_observer.h"
namespace printing {
@@ -68,12 +69,13 @@ int PrinterQuery::cookie() const {
return cookie_;
}
-void PrinterQuery::GetSettings(GetSettingsAskParam ask_user_for_settings,
- gfx::NativeView parent_view,
- int expected_page_count,
- bool has_selection,
- MarginType margin_type,
- const base::Closure& callback) {
+void PrinterQuery::GetSettings(
+ GetSettingsAskParam ask_user_for_settings,
+ scoped_ptr<PrintingUIWebContentsObserver> web_contents_observer,
+ int expected_page_count,
+ bool has_selection,
+ MarginType margin_type,
+ const base::Closure& callback) {
DCHECK_EQ(io_message_loop_, base::MessageLoop::current());
DCHECK(!is_print_dialog_box_shown_);
@@ -85,8 +87,11 @@ void PrinterQuery::GetSettings(GetSettingsAskParam ask_user_for_settings,
FROM_HERE,
base::Bind(&PrintJobWorker::GetSettings,
base::Unretained(worker_.get()),
- is_print_dialog_box_shown_, parent_view,
- expected_page_count, has_selection, margin_type));
+ is_print_dialog_box_shown_,
+ base::Passed(&web_contents_observer),
+ expected_page_count,
+ has_selection,
+ margin_type));
}
void PrinterQuery::SetSettings(const DictionaryValue& new_settings,
« no previous file with comments | « chrome/browser/printing/printer_query.h ('k') | chrome/browser/printing/printing_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698