Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(865)

Unified Diff: pdf/out_of_process_instance.cc

Issue 476733003: OOP PDF - Add support for "page" open pdf parameter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« chrome/browser/resources/pdf/pdf.js ('K') | « chrome/browser/resources/pdf/pdf.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pdf/out_of_process_instance.cc
diff --git a/pdf/out_of_process_instance.cc b/pdf/out_of_process_instance.cc
index d1fd4173d8c48c40bc5b40b5f0835426b8a69e89..37872b8bc370fdcbbec77501b20be17c4ce980af 100644
--- a/pdf/out_of_process_instance.cc
+++ b/pdf/out_of_process_instance.cc
@@ -132,6 +132,8 @@ const char kJSEmailCc[] = "cc";
const char kJSEmailBcc[] = "bcc";
const char kJSEmailSubject[] = "subject";
const char kJSEmailBody[] = "body";
+// Handle open PDF parameters.
+const char kJSHandleOpenPDFParams[] = "openPDFParams";
const int kFindResultCooldownMs = 100;
@@ -1074,9 +1076,9 @@ void OutOfProcessInstance::DocumentLoadComplete(int page_count) {
// Note: If we are in print preview mode the scroll location is retained
// across document loads so we don't want to scroll again and override it.
if (!IsPrintPreview()) {
- int initial_page = GetInitialPage(url_);
- if (initial_page >= 0)
- ScrollToPage(initial_page);
+ pp::VarDictionary message;
+ message.Set(pp::Var(kType), pp::Var(kJSHandleOpenPDFParams));
+ PostMessage(message);
raymes 2014/08/15 01:07:18 I don't think we need to add this new message type
Nikhil 2014/08/16 10:24:01 Done.
} else {
AppendBlankPrintPreviewPages();
OnGeometryChanged(0, 0);
« chrome/browser/resources/pdf/pdf.js ('K') | « chrome/browser/resources/pdf/pdf.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698