Fix compilation errors on OS X
This commit is contained in:
parent
4503aafe64
commit
5fae63a2f5
93 changed files with 242 additions and 317 deletions
|
@ -415,22 +415,19 @@ class PrepareFrameAndViewForPrint : public blink::WebViewClient,
|
|||
return owns_web_view_ && frame() && frame()->isLoading();
|
||||
}
|
||||
|
||||
// TODO(ojan): Remove this override and have this class use a non-null
|
||||
// layerTreeView.
|
||||
// blink::WebViewClient override:
|
||||
virtual bool allowsBrokenNullLayerTreeView() const;
|
||||
|
||||
protected:
|
||||
// blink::WebViewClient override:
|
||||
virtual void didStopLoading();
|
||||
void didStopLoading() override;
|
||||
bool allowsBrokenNullLayerTreeView() const override;
|
||||
|
||||
// blink::WebFrameClient override:
|
||||
virtual blink::WebFrame* createChildFrame(
|
||||
// blink::WebFrameClient:
|
||||
blink::WebFrame* createChildFrame(
|
||||
blink::WebLocalFrame* parent,
|
||||
blink::WebTreeScopeType scope,
|
||||
const blink::WebString& name,
|
||||
blink::WebSandboxFlags sandboxFlags);
|
||||
virtual void frameDetached(blink::WebFrame* frame, DetachType type);
|
||||
blink::WebSandboxFlags sandboxFlags,
|
||||
const blink::WebFrameOwnerProperties& frameOwnerProperties) override;
|
||||
void frameDetached(blink::WebFrame* frame, DetachType type) override;
|
||||
|
||||
private:
|
||||
void CallOnReady();
|
||||
|
@ -576,7 +573,8 @@ blink::WebFrame* PrepareFrameAndViewForPrint::createChildFrame(
|
|||
blink::WebLocalFrame* parent,
|
||||
blink::WebTreeScopeType scope,
|
||||
const blink::WebString& name,
|
||||
blink::WebSandboxFlags sandboxFlags) {
|
||||
blink::WebSandboxFlags sandboxFlags,
|
||||
const blink::WebFrameOwnerProperties& frameOwnerProperties) {
|
||||
blink::WebFrame* frame = blink::WebLocalFrame::create(scope, this);
|
||||
parent->appendChild(frame);
|
||||
return frame;
|
||||
|
@ -814,7 +812,7 @@ bool PrintWebViewHelper::FinalizePrintReadyDocument() {
|
|||
|
||||
// Get the size of the resulting metafile.
|
||||
PdfMetafileSkia* metafile = print_preview_context_.metafile();
|
||||
uint32 buf_size = metafile->GetDataSize();
|
||||
uint32_t buf_size = metafile->GetDataSize();
|
||||
DCHECK_GT(buf_size, 0u);
|
||||
|
||||
PrintHostMsg_DidPreviewDocument_Params preview_params;
|
||||
|
@ -1164,7 +1162,7 @@ bool PrintWebViewHelper::RenderPagesForPrint(blink::WebLocalFrame* frame,
|
|||
bool PrintWebViewHelper::CopyMetafileDataToSharedMem(
|
||||
PdfMetafileSkia* metafile,
|
||||
base::SharedMemoryHandle* shared_mem_handle) {
|
||||
uint32 buf_size = metafile->GetDataSize();
|
||||
uint32_t buf_size = metafile->GetDataSize();
|
||||
scoped_ptr<base::SharedMemory> shared_buf(
|
||||
content::RenderThread::Get()->HostAllocateSharedMemoryBuffer(
|
||||
buf_size).release());
|
||||
|
|
|
@ -92,7 +92,7 @@ bool PrintWebViewHelper::PrintPagesNative(blink::WebFrame* frame,
|
|||
metafile.FinishDocument();
|
||||
|
||||
// Get the size of the resulting metafile.
|
||||
uint32 buf_size = metafile.GetDataSize();
|
||||
uint32_t buf_size = metafile.GetDataSize();
|
||||
DCHECK_GT(buf_size, 0u);
|
||||
|
||||
#if defined(OS_CHROMEOS) || defined(OS_ANDROID)
|
||||
|
|
|
@ -116,15 +116,13 @@ void PrintWebViewHelper::RenderPage(const PrintMsg_Print_Params& params,
|
|||
gfx::Rect canvas_area = content_area;
|
||||
|
||||
{
|
||||
skia::PlatformCanvas* canvas = metafile->GetVectorCanvasForNewPage(
|
||||
SkCanvas* canvas = metafile->GetVectorCanvasForNewPage(
|
||||
*page_size, canvas_area, scale_factor);
|
||||
if (!canvas)
|
||||
return;
|
||||
|
||||
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, static_cast<blink::WebCanvas*>(canvas));
|
||||
}
|
||||
|
|
|
@ -96,7 +96,7 @@ bool PrintWebViewHelper::PrintPagesNative(blink::WebFrame* frame,
|
|||
metafile.FinishDocument();
|
||||
|
||||
// Get the size of the resulting metafile.
|
||||
uint32 buf_size = metafile.GetDataSize();
|
||||
uint32_t buf_size = metafile.GetDataSize();
|
||||
DCHECK_GT(buf_size, 0u);
|
||||
|
||||
PrintHostMsg_DidPrintPage_Params printed_page_params;
|
||||
|
@ -218,7 +218,7 @@ void PrintWebViewHelper::PrintPageInternal(
|
|||
bool PrintWebViewHelper::CopyMetafileDataToSharedMem(
|
||||
PdfMetafileSkia* metafile,
|
||||
base::SharedMemoryHandle* shared_mem_handle) {
|
||||
uint32 buf_size = metafile->GetDataSize();
|
||||
uint32_t buf_size = metafile->GetDataSize();
|
||||
base::SharedMemory shared_buf;
|
||||
// Allocate a shared memory buffer to hold the generated metafile data.
|
||||
if (!shared_buf.CreateAndMapAnonymous(buf_size)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue