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

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

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/print_job_worker.cc ('k') | chrome/browser/printing/printer_query.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/printing/printer_query.h
diff --git a/chrome/browser/printing/printer_query.h b/chrome/browser/printing/printer_query.h
index 3256a917b718c197f044117a0e4a66ecbf43962e..aab49143242a95ae2363d926a76261df9176ebe3 100644
--- a/chrome/browser/printing/printer_query.h
+++ b/chrome/browser/printing/printer_query.h
@@ -10,7 +10,8 @@
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/printing/print_job_worker_owner.h"
#include "printing/print_job_constants.h"
-#include "ui/gfx/native_widget_types.h"
+
+class PrintingUIWebContentsObserver;
namespace base {
class DictionaryValue;
@@ -19,8 +20,8 @@ class MessageLoop;
namespace printing {
- class PrintDestinationInterface;
- class PrintJobWorker;
+class PrintDestinationInterface;
+class PrintJobWorker;
// Query the printer for settings.
class PrinterQuery : public PrintJobWorkerOwner {
@@ -42,15 +43,16 @@ class PrinterQuery : public PrintJobWorkerOwner {
virtual int cookie() const OVERRIDE;
// Initializes the printing context. It is fine to call this function multiple
- // times to reinitialize the settings. |parent_view| parameter's window will
- // be the owner of the print setting dialog box. It is unused when
+ // times to reinitialize the settings. |web_contents_observer| can be queried
+ // to find the owner of the print setting dialog box. It is unused when
// |ask_for_user_settings| is DEFAULTS.
- void 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 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);
// Updates the current settings with |new_settings| dictionary values.
void SetSettings(const base::DictionaryValue& new_settings,
« no previous file with comments | « chrome/browser/printing/print_job_worker.cc ('k') | chrome/browser/printing/printer_query.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698