Merge remote-tracking branch 'upstream/master'
# Conflicts: # atom/browser/api/atom_api_web_contents.cc # chromium_src/chrome/browser/printing/print_job_worker.cc # chromium_src/chrome/browser/printing/print_job_worker.h # chromium_src/chrome/browser/printing/print_view_manager_base.cc # chromium_src/chrome/browser/printing/print_view_manager_base.h # chromium_src/chrome/browser/printing/printer_query.cc # chromium_src/chrome/common/print_messages.cc # chromium_src/chrome/renderer/printing/print_web_view_helper.cc
This commit is contained in:
commit
26135b412b
168 changed files with 1632 additions and 1755 deletions
|
@ -9,6 +9,7 @@
|
|||
|
||||
#include "base/callback.h"
|
||||
#include "base/compiler_specific.h"
|
||||
#include "base/macros.h"
|
||||
#include "chrome/browser/printing/print_job_worker_owner.h"
|
||||
#include "printing/print_job_constants.h"
|
||||
|
||||
|
@ -25,30 +26,32 @@ class PrintJobWorker;
|
|||
class PrinterQuery : public PrintJobWorkerOwner {
|
||||
public:
|
||||
// GetSettings() UI parameter.
|
||||
enum GetSettingsAskParam {
|
||||
enum class GetSettingsAskParam {
|
||||
DEFAULTS,
|
||||
ASK_USER,
|
||||
};
|
||||
|
||||
PrinterQuery(int render_process_id, int render_view_id);
|
||||
PrinterQuery(int render_process_id, int render_frame_id);
|
||||
|
||||
// PrintJobWorkerOwner implementation.
|
||||
virtual void GetSettingsDone(const PrintSettings& new_settings,
|
||||
PrintingContext::Result result) override;
|
||||
virtual PrintJobWorker* DetachWorker(PrintJobWorkerOwner* new_owner) override;
|
||||
virtual const PrintSettings& settings() const override;
|
||||
virtual int cookie() const override;
|
||||
void GetSettingsDone(const PrintSettings& new_settings,
|
||||
PrintingContext::Result result) override;
|
||||
std::unique_ptr<PrintJobWorker> DetachWorker(
|
||||
PrintJobWorkerOwner* new_owner) override;
|
||||
const PrintSettings& settings() const override;
|
||||
int cookie() const override;
|
||||
|
||||
// Initializes the printing context. It is fine to call this function multiple
|
||||
// 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,
|
||||
int expected_page_count,
|
||||
bool has_selection,
|
||||
MarginType margin_type,
|
||||
const base::Closure& callback);
|
||||
void GetSettings(GetSettingsAskParam ask_user_for_settings,
|
||||
int expected_page_count,
|
||||
bool has_selection,
|
||||
MarginType margin_type,
|
||||
bool is_scripted,
|
||||
bool is_modifiable,
|
||||
const base::Closure& callback);
|
||||
|
||||
void GetSettings(
|
||||
GetSettingsAskParam ask_user_for_settings,
|
||||
|
@ -74,7 +77,7 @@ class PrinterQuery : public PrintJobWorkerOwner {
|
|||
bool is_valid() const;
|
||||
|
||||
private:
|
||||
virtual ~PrinterQuery();
|
||||
~PrinterQuery() override;
|
||||
|
||||
// Lazy create the worker thread. There is one worker thread per print job.
|
||||
void StartWorker(const base::Closure& callback);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue