Fix other compilation errors
This commit is contained in:
parent
98fbe5127b
commit
5b2c0110dc
9 changed files with 16 additions and 27 deletions
|
@ -9,6 +9,7 @@
|
|||
|
||||
#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"
|
||||
|
|
|
@ -12,8 +12,8 @@
|
|||
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() {
|
||||
|
|
|
@ -112,7 +112,8 @@ std::vector<std::string> String16VectorToStringVector(
|
|||
}
|
||||
#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 =
|
||||
|
|
|
@ -192,6 +192,7 @@ void PrintJobWorker::GetSettingsWithUI(
|
|||
printing_context_->AskUserForSettings(
|
||||
document_page_count,
|
||||
has_selection,
|
||||
false,
|
||||
base::Bind(&PrintJobWorker::GetSettingsWithUIDone,
|
||||
base::Unretained(this)));
|
||||
}
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
#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"
|
||||
|
|
|
@ -130,16 +130,11 @@ void PrintWebViewHelper::PrintPageInternal(
|
|||
&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_);
|
||||
|
||||
|
|
|
@ -76,20 +76,17 @@ void PrintWebViewHelper::RenderPage(const PrintMsg_Print_Params& params,
|
|||
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.
|
||||
|
|
|
@ -184,16 +184,11 @@ void PrintWebViewHelper::PrintPageInternal(
|
|||
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_);
|
||||
|
||||
|
|
2
vendor/native_mate
vendored
2
vendor/native_mate
vendored
|
@ -1 +1 @@
|
|||
Subproject commit 21e76665a20527ea0d7b21c2a2a1f310b660ffe9
|
||||
Subproject commit a636fad51e862d52c7bdb527c91300c85ed3c254
|
Loading…
Reference in a new issue