Commit d86f770e authored by Lei Zhang's avatar Lei Zhang Committed by Commit Bot

Enable saving from the PDF plugin if the user go into annotation mode.

Do not bother with the extra effort of trying to detect the case of the
user going into annotation mode and then not making any edits. Just
assume they likely will to keep the state machine simpler.

BUG=936094

Change-Id: I82a793e39f7175c5bffdb3c93630f9b085385dca
Reviewed-on: https://chromium-review.googlesource.com/c/1490397Reviewed-by: default avatardstockwell <dstockwell@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#635787}
parent f36d4cb3
......@@ -673,6 +673,10 @@ void OutOfProcessInstance::HandleMessage(const pp::Var& message) {
}
const bool force = dict.Get(pp::Var(kJSForce)).AsBool();
if (force) {
// |force| being true means the user has entered annotation mode. In which
// case, assume the user will make edits and prefer saving using the
// plugin data.
pp::PDF::SetPluginCanSave(this, true);
SaveToBuffer(dict.Get(pp::Var(kJSToken)).AsString());
} else {
SaveToFile(dict.Get(pp::Var(kJSToken)).AsString());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment