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

Unified Diff: chrome/renderer/plugins/pdf_plugin_placeholder.cc

Issue 2971753003: Add DownloadPDF Callback function. (Closed)
Patch Set: . Created 3 years, 5 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/renderer/plugins/pdf_plugin_placeholder.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/plugins/pdf_plugin_placeholder.cc
diff --git a/chrome/renderer/plugins/pdf_plugin_placeholder.cc b/chrome/renderer/plugins/pdf_plugin_placeholder.cc
index 3263551c8f9bbf9fb0f54b346856ffb04d9ffba5..6e20cfbce38d5d95d2839659ae16a40719d2095a 100644
--- a/chrome/renderer/plugins/pdf_plugin_placeholder.cc
+++ b/chrome/renderer/plugins/pdf_plugin_placeholder.cc
@@ -5,6 +5,7 @@
#include "chrome/renderer/plugins/pdf_plugin_placeholder.h"
#include "chrome/grit/renderer_resources.h"
+#include "gin/object_template_builder.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/base/webui/jstemplate_builder.h"
@@ -31,3 +32,14 @@ PDFPluginPlaceholder* PDFPluginPlaceholder::CreatePDFPlaceholder(
v8::Local<v8::Value> PDFPluginPlaceholder::GetV8Handle(v8::Isolate* isolate) {
return gin::CreateHandle(isolate, this).ToV8();
}
+
+gin::ObjectTemplateBuilder PDFPluginPlaceholder::GetObjectTemplateBuilder(
+ v8::Isolate* isolate) {
+ return gin::Wrappable<PDFPluginPlaceholder>::GetObjectTemplateBuilder(isolate)
+ .SetMethod<void (PDFPluginPlaceholder::*)()>(
+ "downloadPDF", &PDFPluginPlaceholder::DownloadPDFCallback);
+}
+
+void PDFPluginPlaceholder::DownloadPDFCallback() {
+ // TODO(amberwon): Implement starting PDF download.
+}
« no previous file with comments | « chrome/renderer/plugins/pdf_plugin_placeholder.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698