#include "atom/browser/native_window.h"
#include "base/files/file_util.h"
+#include "base/mac/foundation_util.h"
#include "base/mac/mac_util.h"
#include "base/mac/scoped_cftyperef.h"
#include "base/strings/sys_string_conversions.h"
namespace crash_reporter {
CrashReporter::CrashReporter() {
- auto command_line = base::CommandLine::ForCurrentProcess();
- is_browser_ = command->GetSwitchValueASCII(switches::kProcessType).empty();
+ auto cmd = base::CommandLine::ForCurrentProcess();
+ is_browser_ = cmd->GetSwitchValueASCII(switches::kProcessType).empty();
}
CrashReporter::~CrashReporter() {
}
#endif
-base::FilePath GetResourcesPath(CommandLine* command_line, bool is_browser) {
+base::FilePath GetResourcesPath(base::CommandLine* command_line,
+ bool is_browser) {
base::FilePath exec_path(command_line->argv()[0]);
PathService::Get(base::FILE_EXE, &exec_path);
base::FilePath resources_path =
printing_context_->AskUserForSettings(
document_page_count,
has_selection,
+ false,
base::Bind(&PrintJobWorker::GetSettingsWithUIDone,
base::Unretained(this)));
}
#include "net/base/escape.h"
#include "printing/pdf_metafile_skia.h"
#include "printing/units.h"
-#include "skia/ext/vector_platform_device_skia.h"
#include "third_party/WebKit/public/platform/WebSize.h"
#include "third_party/WebKit/public/platform/WebURLRequest.h"
#include "third_party/WebKit/public/web/WebConsoleMessage.h"
&content_area);
gfx::Rect canvas_area = content_area;
- SkBaseDevice* device = metafile->StartPageForVectorCanvas(page_size,
- canvas_area,
- scale_factor);
- if (!device)
+ skia::PlatformCanvas* canvas = metafile->GetVectorCanvasForNewPage(
+ *page_size, canvas_area, scale_factor);
+ if (!canvas)
return;
- // The printPage method take a reference to the canvas we pass down, so it
- // can't be a stack object.
- skia::RefPtr<skia::VectorCanvas> canvas =
- skia::AdoptRef(new skia::VectorCanvas(device));
MetafileSkiaWrapper::SetMetafileOnCanvas(*canvas, metafile);
skia::SetIsDraftMode(*canvas, is_print_ready_metafile_sent_);
gfx::Rect canvas_area = content_area;
{
- SkBaseDevice* device = metafile->StartPageForVectorCanvas(
+ skia::PlatformCanvas* canvas = metafile->GetVectorCanvasForNewPage(
*page_size, canvas_area, scale_factor);
- if (!device)
+ if (!canvas)
return;
- skia::RefPtr<skia::VectorCanvas> canvas =
- skia::AdoptRef(new skia::VectorCanvas(device));
- blink::WebCanvas* canvas_ptr = canvas.get();
MetafileSkiaWrapper::SetMetafileOnCanvas(*canvas, metafile);
skia::SetIsDraftMode(*canvas, is_print_ready_metafile_sent_);
skia::SetIsPreviewMetafile(*canvas, is_preview);
RenderPageContent(frame, page_number, canvas_area, content_area,
- scale_factor, canvas_ptr);
+ scale_factor, static_cast<blink::WebCanvas*>(canvas));
}
// Done printing. Close the device context to retrieve the compiled metafile.
frame->getPrintPageShrink(params.page_number);
float scale_factor = css_scale_factor * webkit_page_shrink_factor;
- SkBaseDevice* device = metafile->StartPageForVectorCanvas(page_size,
- canvas_area,
- scale_factor);
- if (!device)
+ skia::PlatformCanvas* canvas = metafile->GetVectorCanvasForNewPage(
+ page_size, canvas_area, scale_factor);
+ if (!canvas)
return;
- // The printPage method take a reference to the canvas we pass down, so it
- // can't be a stack object.
- skia::RefPtr<skia::VectorCanvas> canvas =
- skia::AdoptRef(new skia::VectorCanvas(device));
MetafileSkiaWrapper::SetMetafileOnCanvas(*canvas, metafile);
skia::SetIsDraftMode(*canvas, is_print_ready_metafile_sent_);
-Subproject commit 21e76665a20527ea0d7b21c2a2a1f310b660ffe9
+Subproject commit a636fad51e862d52c7bdb527c91300c85ed3c254