format previously missed chromium_src .cc files
This commit is contained in:
parent
8cc81509d7
commit
f7d4437b3f
58 changed files with 688 additions and 898 deletions
|
@ -12,8 +12,8 @@
|
|||
#include "base/location.h"
|
||||
#include "base/message_loop/message_loop.h"
|
||||
#include "base/run_loop.h"
|
||||
#include "base/task_scheduler/post_task.h"
|
||||
#include "base/single_thread_task_runner.h"
|
||||
#include "base/task_scheduler/post_task.h"
|
||||
#include "base/threading/sequenced_worker_pool.h"
|
||||
#include "base/threading/thread_restrictions.h"
|
||||
#include "base/threading/thread_task_runner_handle.h"
|
||||
|
@ -44,9 +44,7 @@ void HoldRefCallback(const scoped_refptr<PrintJobWorkerOwner>& owner,
|
|||
} // namespace
|
||||
|
||||
PrintJob::PrintJob()
|
||||
: is_job_pending_(false),
|
||||
is_canceling_(false),
|
||||
quit_factory_(this) {
|
||||
: is_job_pending_(false), is_canceling_(false), quit_factory_(this) {
|
||||
// This is normally a UI message loop, but in unit tests, the message loop is
|
||||
// of the 'default' type.
|
||||
DCHECK(base::MessageLoopForUI::IsCurrent() ||
|
||||
|
@ -133,8 +131,7 @@ void PrintJob::StartPrinting() {
|
|||
scoped_refptr<JobEventDetails> details(
|
||||
new JobEventDetails(JobEventDetails::NEW_DOC, document_.get(), nullptr));
|
||||
content::NotificationService::current()->Notify(
|
||||
chrome::NOTIFICATION_PRINT_JOB_EVENT,
|
||||
content::Source<PrintJob>(this),
|
||||
chrome::NOTIFICATION_PRINT_JOB_EVENT, content::Source<PrintJob>(this),
|
||||
content::Details<JobEventDetails>(details.get()));
|
||||
}
|
||||
|
||||
|
@ -178,8 +175,7 @@ void PrintJob::Cancel() {
|
|||
scoped_refptr<JobEventDetails> details(
|
||||
new JobEventDetails(JobEventDetails::FAILED, nullptr, nullptr));
|
||||
content::NotificationService::current()->Notify(
|
||||
chrome::NOTIFICATION_PRINT_JOB_EVENT,
|
||||
content::Source<PrintJob>(this),
|
||||
chrome::NOTIFICATION_PRINT_JOB_EVENT, content::Source<PrintJob>(this),
|
||||
content::Details<JobEventDetails>(details.get()));
|
||||
Stop();
|
||||
is_canceling_ = false;
|
||||
|
@ -221,8 +217,8 @@ class PrintJob::PdfConversionState {
|
|||
void Start(const scoped_refptr<base::RefCountedMemory>& data,
|
||||
const PdfRenderSettings& conversion_settings,
|
||||
const PdfConverter::StartCallback& start_callback) {
|
||||
converter_ = PdfConverter::StartPdfConverter(
|
||||
data, conversion_settings, start_callback);
|
||||
converter_ = PdfConverter::StartPdfConverter(data, conversion_settings,
|
||||
start_callback);
|
||||
}
|
||||
|
||||
void GetMorePages(const PdfConverter::GetPageCallback& get_page_callback) {
|
||||
|
@ -313,8 +309,8 @@ void PrintJob::StartPdfToPostScriptConversion(
|
|||
const gfx::Point& physical_offsets,
|
||||
bool ps_level2) {
|
||||
DCHECK(!pdf_conversion_state_);
|
||||
pdf_conversion_state_ = std::make_unique<PdfConversionState>(
|
||||
gfx::Size(), gfx::Rect());
|
||||
pdf_conversion_state_ =
|
||||
std::make_unique<PdfConversionState>(gfx::Size(), gfx::Rect());
|
||||
const int kPrinterDpi = settings().dpi();
|
||||
PdfRenderSettings settings(
|
||||
content_area, physical_offsets, kPrinterDpi, true /* autorotate? */,
|
||||
|
@ -399,8 +395,7 @@ void PrintJob::OnDocumentDone() {
|
|||
scoped_refptr<JobEventDetails> details(
|
||||
new JobEventDetails(JobEventDetails::JOB_DONE, document_.get(), nullptr));
|
||||
content::NotificationService::current()->Notify(
|
||||
chrome::NOTIFICATION_PRINT_JOB_EVENT,
|
||||
content::Source<PrintJob>(this),
|
||||
chrome::NOTIFICATION_PRINT_JOB_EVENT, content::Source<PrintJob>(this),
|
||||
content::Details<JobEventDetails>(details.get()));
|
||||
}
|
||||
|
||||
|
@ -431,7 +426,6 @@ void PrintJob::ControlledWorkerShutdown() {
|
|||
}
|
||||
#endif
|
||||
|
||||
|
||||
// Now make sure the thread object is cleaned up. Do this on a worker
|
||||
// thread because it may block.
|
||||
base::PostTaskAndReply(
|
||||
|
@ -444,8 +438,7 @@ void PrintJob::ControlledWorkerShutdown() {
|
|||
UpdatePrintedDocument(nullptr);
|
||||
}
|
||||
|
||||
void PrintJob::HoldUntilStopIsCalled() {
|
||||
}
|
||||
void PrintJob::HoldUntilStopIsCalled() {}
|
||||
|
||||
void PrintJob::Quit() {
|
||||
base::RunLoop::QuitCurrentWhenIdleDeprecated();
|
||||
|
@ -455,16 +448,16 @@ void PrintJob::Quit() {
|
|||
JobEventDetails::JobEventDetails(Type type,
|
||||
PrintedDocument* document,
|
||||
PrintedPage* page)
|
||||
: document_(document),
|
||||
page_(page),
|
||||
type_(type) {
|
||||
: document_(document), page_(page), type_(type) {}
|
||||
|
||||
JobEventDetails::~JobEventDetails() {}
|
||||
|
||||
PrintedDocument* JobEventDetails::document() const {
|
||||
return document_.get();
|
||||
}
|
||||
|
||||
JobEventDetails::~JobEventDetails() {
|
||||
PrintedPage* JobEventDetails::page() const {
|
||||
return page_.get();
|
||||
}
|
||||
|
||||
PrintedDocument* JobEventDetails::document() const { return document_.get(); }
|
||||
|
||||
PrintedPage* JobEventDetails::page() const { return page_.get(); }
|
||||
|
||||
} // namespace printing
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue