listen to ipc messages from plugin to perform SaveAs op
This commit is contained in:
parent
fd8c450ef3
commit
0c7bb72891
9 changed files with 286 additions and 2 deletions
39
chromium_src/components/pdf/common/pdf_message_generator.cc
Normal file
39
chromium_src/components/pdf/common/pdf_message_generator.cc
Normal file
|
@ -0,0 +1,39 @@
|
|||
// 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.
|
||||
|
||||
// Get basic type definitions.
|
||||
#define IPC_MESSAGE_IMPL
|
||||
#include "components/pdf/common/pdf_message_generator.h"
|
||||
|
||||
// Generate constructors.
|
||||
#include "ipc/struct_constructor_macros.h"
|
||||
#include "components/pdf/common/pdf_message_generator.h"
|
||||
|
||||
// Generate destructors.
|
||||
#include "ipc/struct_destructor_macros.h"
|
||||
#include "components/pdf/common/pdf_message_generator.h"
|
||||
|
||||
// Generate param traits size methods.
|
||||
#include "ipc/param_traits_size_macros.h"
|
||||
namespace IPC {
|
||||
#include "components/pdf/common/pdf_message_generator.h"
|
||||
}
|
||||
|
||||
// Generate param traits write methods.
|
||||
#include "ipc/param_traits_write_macros.h"
|
||||
namespace IPC {
|
||||
#include "components/pdf/common/pdf_message_generator.h"
|
||||
} // namespace IPC
|
||||
|
||||
// Generate param traits read methods.
|
||||
#include "ipc/param_traits_read_macros.h"
|
||||
namespace IPC {
|
||||
#include "components/pdf/common/pdf_message_generator.h"
|
||||
} // namespace IPC
|
||||
|
||||
// Generate param traits log methods.
|
||||
#include "ipc/param_traits_log_macros.h"
|
||||
namespace IPC {
|
||||
#include "components/pdf/common/pdf_message_generator.h"
|
||||
} // namespace IPC
|
|
@ -0,0 +1,7 @@
|
|||
// 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 "components/pdf/common/pdf_messages.h"
|
26
chromium_src/components/pdf/common/pdf_messages.h
Normal file
26
chromium_src/components/pdf/common/pdf_messages.h
Normal file
|
@ -0,0 +1,26 @@
|
|||
// 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
|
||||
|
||||
// Updates the content restrictions, i.e. to disable print/copy.
|
||||
IPC_MESSAGE_ROUTED1(PDFHostMsg_PDFUpdateContentRestrictions,
|
||||
int /* restrictions */)
|
||||
|
||||
// The currently displayed PDF has an unsupported feature.
|
||||
IPC_MESSAGE_ROUTED0(PDFHostMsg_PDFHasUnsupportedFeature)
|
||||
|
||||
// Brings up SaveAs... dialog to save specified URL.
|
||||
IPC_MESSAGE_ROUTED2(PDFHostMsg_PDFSaveURLAs,
|
||||
GURL /* url */,
|
||||
content::Referrer /* referrer */)
|
Loading…
Add table
Add a link
Reference in a new issue