FIXME: PDF component IPC should be converted to Mojo.

https://codereview.chromium.org/2455543002
This commit is contained in:
deepak1556 2017-11-27 12:30:14 +05:30 committed by Cheng Zhao
parent e03f7baa60
commit 25d966110e
6 changed files with 12 additions and 26 deletions

View file

@ -1,19 +0,0 @@
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Multiply-included file, no traditional include guard.
#include <string.h>
#include "content/public/common/common_param_traits_macros.h"
#include "content/public/common/referrer.h"
#include "ipc/ipc_message_macros.h"
#include "url/gurl.h"
#include "url/ipc/url_param_traits.h"
#define IPC_MESSAGE_START PDFMsgStart
// Brings up SaveAs... dialog to save specified URL.
IPC_MESSAGE_ROUTED2(PDFHostMsg_PDFSaveURLAs,
GURL /* url */,
content::Referrer /* referrer */)

View file

@ -4,8 +4,8 @@
#include "components/pdf/renderer/pepper_pdf_host.h"
#include "atom/common/api/api_messages.h"
#include "base/memory/ptr_util.h"
#include "components/pdf/common/pdf_messages.h"
#include "content/public/common/referrer.h"
#include "content/public/renderer/pepper_plugin_instance.h"
#include "content/public/renderer/render_frame.h"
@ -77,8 +77,8 @@ int32_t PepperPDFHost::OnHostMsgSaveAs(
referrer.url = url;
referrer.policy = blink::kWebReferrerPolicyDefault;
referrer = content::Referrer::SanitizeForRequest(url, referrer);
render_frame->Send(
new PDFHostMsg_PDFSaveURLAs(render_frame->GetRoutingID(), url, referrer));
render_frame->Send(new AtomFrameHostMsg_PDFSaveURLAs(
render_frame->GetRoutingID(), url, referrer));
return PP_OK;
}