Index: chrome/browser/pdf/pdf_extension_util.h |
diff --git a/chrome/browser/pdf/pdf_extension_util.h b/chrome/browser/pdf/pdf_extension_util.h |
index 75dd882b0081fa8ffc64884ff257889879a6eae2..ce0ab58c40e168e38529a30f3a103c78db9d0c12 100644 |
--- a/chrome/browser/pdf/pdf_extension_util.h |
+++ b/chrome/browser/pdf/pdf_extension_util.h |
@@ -7,6 +7,10 @@ |
#include <string> |
+namespace content { |
+class WebContents; |
+} // namespace content |
+ |
namespace pdf_extension_util { |
// The ResourceIdentifier for the PDF Viewer plugin. |
@@ -17,6 +21,13 @@ extern const char kPdfResourceIdentifier[]; |
// flags are enabled. |
std::string GetManifest(); |
+// Ensures through PDFScriptingAPI that a PDF has finished loading inside the |
+// given |web_contents|. |
+// Returns true if it loads successfully or false if it fails. If it doesn't |
+// finish loading the test will hang. This is done from outside of the |
+// BrowserPluginGuest to ensure the PDFScriptingAPI works correctly from there. |
+bool EnsurePDFHasLoaded(content::WebContents* web_contents); |
+ |
} // namespace pdf_extension_util |
#endif // CHROME_BROWSER_PDF_PDF_EXTENSION_UTIL_H_ |