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

Unified Diff: pdf/out_of_process_instance.h

Issue 347763007: Improve scrolling performance in OOP PDF (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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
« no previous file with comments | « chrome/test/data/pdf/viewport_test.js ('k') | pdf/out_of_process_instance.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pdf/out_of_process_instance.h
diff --git a/pdf/out_of_process_instance.h b/pdf/out_of_process_instance.h
index bd70be2c4ed724253649347e93397dd4b77b0ffb..f1f88621b46f58469732ba40f4fd3f52d2364d61 100644
--- a/pdf/out_of_process_instance.h
+++ b/pdf/out_of_process_instance.h
@@ -26,7 +26,6 @@
#include "ppapi/cpp/instance.h"
#include "ppapi/cpp/private/find_private.h"
#include "ppapi/cpp/private/uma_private.h"
-#include "ppapi/cpp/private/var_private.h"
#include "ppapi/cpp/url_loader.h"
#include "ppapi/utility/completion_callback_factory.h"
@@ -205,6 +204,9 @@ class OutOfProcessInstance : public pp::Instance,
// Load the next available preview page into the blank page.
void LoadAvailablePreviewPage();
+ // Bound the given scroll offset to the document.
+ pp::Point BoundScrollOffsetToDocument(const pp::Point& scroll_offset);
+
pp::ImageData image_data_;
// Used when the plugin is embedded in a page and we have to create the loader
// ourself.
@@ -284,10 +286,6 @@ class OutOfProcessInstance : public pp::Instance,
DocumentLoadState document_load_state_;
DocumentLoadState preview_document_load_state_;
- // JavaScript interface to control this instance.
- // This wraps a PDFScriptableObject in a pp::Var.
- pp::VarPrivate instance_object_;
-
// A UMA resource for histogram reporting.
pp::UMAPrivate uma_;
@@ -333,6 +331,11 @@ class OutOfProcessInstance : public pp::Instance,
// document finishes loading.
bool did_call_start_loading_;
+ // If this is true, then don't scroll the plugin in response to DidChangeView
+ // messages. This will be true when the extension page is in the process of
+ // zooming the plugin so that flickering doesn't occur while zooming.
+ bool stop_scrolling_;
+
// The callback for receiving the password from the page.
scoped_ptr<pp::CompletionCallbackWithOutput<pp::Var> > password_callback_;
};
« no previous file with comments | « chrome/test/data/pdf/viewport_test.js ('k') | pdf/out_of_process_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698