Adapt to changes of Chrome 51 API changes (Part 2)

This commit is contained in:
Cheng Zhao 2016-05-23 12:28:59 +09:00
parent 7ba391da7c
commit a2bd55dd3c
48 changed files with 131 additions and 131 deletions

View file

@ -1169,7 +1169,7 @@ bool PrintWebViewHelper::CopyMetafileDataToSharedMem(
if (buf_size == 0)
return false;
scoped_ptr<base::SharedMemory> shared_buf(
std::unique_ptr<base::SharedMemory> shared_buf(
content::RenderThread::Get()->HostAllocateSharedMemoryBuffer(buf_size));
if (!shared_buf)
return false;

View file

@ -244,10 +244,10 @@ class PrintWebViewHelper
void SetPrintPagesParams(const PrintMsg_PrintPages_Params& settings);
// WebView used only to print the selection.
scoped_ptr<PrepareFrameAndViewForPrint> prep_frame_view_;
std::unique_ptr<PrepareFrameAndViewForPrint> prep_frame_view_;
bool reset_prep_frame_view_;
scoped_ptr<PrintMsg_PrintPages_Params> print_pages_params_;
std::unique_ptr<PrintMsg_PrintPages_Params> print_pages_params_;
bool is_print_ready_metafile_sent_;
bool ignore_css_margins_;
@ -343,8 +343,8 @@ class PrintWebViewHelper
FrameReference source_frame_;
blink::WebNode source_node_;
scoped_ptr<PrepareFrameAndViewForPrint> prep_frame_view_;
scoped_ptr<PdfMetafileSkia> metafile_;
std::unique_ptr<PrepareFrameAndViewForPrint> prep_frame_view_;
std::unique_ptr<PdfMetafileSkia> metafile_;
// Total page count in the renderer.
int total_page_count_;

View file

@ -29,7 +29,7 @@ bool PrintWebViewHelper::RenderPreviewPage(
PrintMsg_PrintPage_Params page_params;
page_params.params = print_params;
page_params.page_number = page_number;
scoped_ptr<PdfMetafileSkia> draft_metafile;
std::unique_ptr<PdfMetafileSkia> draft_metafile;
PdfMetafileSkia* initial_render_metafile = print_preview_context_.metafile();
if (print_preview_context_.IsModifiable() && is_print_ready_metafile_sent_) {
draft_metafile.reset(new PdfMetafileSkia);

View file

@ -54,7 +54,7 @@ bool PrintWebViewHelper::RenderPreviewPage(
int page_number,
const PrintMsg_Print_Params& print_params) {
PrintMsg_Print_Params printParams = print_params;
scoped_ptr<PdfMetafileSkia> draft_metafile;
std::unique_ptr<PdfMetafileSkia> draft_metafile;
PdfMetafileSkia* initial_render_metafile = print_preview_context_.metafile();
bool render_to_draft = print_preview_context_.IsModifiable() &&

View file

@ -27,7 +27,7 @@ bool PrintWebViewHelper::RenderPreviewPage(
PrintMsg_PrintPage_Params page_params;
page_params.params = print_params;
page_params.page_number = page_number;
scoped_ptr<PdfMetafileSkia> draft_metafile;
std::unique_ptr<PdfMetafileSkia> draft_metafile;
PdfMetafileSkia* initial_render_metafile = print_preview_context_.metafile();
if (print_preview_context_.IsModifiable() && is_print_ready_metafile_sent_) {
draft_metafile.reset(new PdfMetafileSkia);