chore: modernize base::Value usage in shell/renderer/printing (#34682)

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
Jeremy Rose 2022-06-22 10:37:58 -07:00 committed by GitHub
parent 5895296239
commit cd19a741b1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4,6 +4,8 @@
#include "shell/renderer/printing/print_render_frame_helper_delegate.h"
#include <utility>
#include "content/public/renderer/render_frame.h"
#include "extensions/buildflags/buildflags.h"
#include "third_party/blink/public/web/web_element.h"
@ -49,9 +51,9 @@ bool PrintRenderFrameHelperDelegate::OverridePrint(
// instructs the PDF plugin to print. This is to make window.print() on a
// PDF plugin document correctly print the PDF. See
// https://crbug.com/448720.
base::DictionaryValue message;
message.SetString("type", "print");
post_message_support->PostMessageFromValue(message);
base::Value::Dict message;
message.Set("type", "print");
post_message_support->PostMessageFromValue(base::Value(std::move(message)));
return true;
}
#endif // BUILDFLAG(ENABLE_EXTENSIONS)