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

Unified Diff: chrome/browser/resources/pdf/pdf_scripting_api.js

Issue 843923002: Revert of Add print and getSelectedText functions to the OOP PDF scripting API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@postMessage-api
Patch Set: Created 5 years, 11 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/browser/resources/pdf/pdf.js ('k') | chrome/test/data/pdf/basic_plugin_test.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/pdf/pdf_scripting_api.js
diff --git a/chrome/browser/resources/pdf/pdf_scripting_api.js b/chrome/browser/resources/pdf/pdf_scripting_api.js
index e8dd4bca03a412020645901432979cf911758427..33556b994fda8cafe273c55fb86deff19e3bed5e 100644
--- a/chrome/browser/resources/pdf/pdf_scripting_api.js
+++ b/chrome/browser/resources/pdf/pdf_scripting_api.js
@@ -37,12 +37,6 @@
if (this.accessibilityCallback_) {
this.accessibilityCallback_(event.data.json);
this.accessibilityCallback_ = null;
- }
- break;
- case 'getSelectedTextReply':
- if (this.selectedTextCallback_) {
- this.selectedTextCallback_(event.data.selectedText);
- this.selectedTextCallback_ = null;
}
break;
}
@@ -135,8 +129,7 @@
},
/**
- * Get accessibility JSON for the document. May only be called after document
- * load.
+ * Get accessibility JSON for the document.
* @param {Function} callback a callback to be called with the accessibility
* json that has been retrieved.
* @param {number} [page] the 0-indexed page number to get accessibility data
@@ -156,42 +149,6 @@
message.page = page;
this.sendMessage_(message);
return true;
- },
-
- /**
- * Select all the text in the document. May only be called after document
- * load.
- */
- selectAll: function() {
- this.sendMessage_({
- type: 'selectAll'
- });
- },
-
- /**
- * Get the selected text in the document. The callback will be called with the
- * text that is selected. May only be called after document load.
- * @param {Function} callback a callback to be called with the selected text.
- * @return {boolean} true if the function is successful, false if there is an
- * outstanding request for selected text that has not been answered.
- */
- getSelectedText: function(callback) {
- if (this.selectedTextCallback_)
- return false;
- this.selectedTextCallback_ = callback;
- this.sendMessage_({
- type: 'getSelectedText'
- });
- return true;
- },
-
- /**
- * Print the document. May only be called after document load.
- */
- print: function() {
- this.sendMessage_({
- type: 'print'
- });
},
/**
« no previous file with comments | « chrome/browser/resources/pdf/pdf.js ('k') | chrome/test/data/pdf/basic_plugin_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698