Chromium Code Reviews| 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..82dcdd4022438fb13d18a5f7c277ada118b47be6 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,17 @@ 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) { |
| + gin::ObjectTemplateBuilder builder = |
| + gin::Wrappable<PDFPluginPlaceholder>::GetObjectTemplateBuilder(isolate) |
| + .SetMethod<void (PDFPluginPlaceholder::*)()>( |
| + "downloadPDF", &PDFPluginPlaceholder::DownloadPDFCallback); |
| + |
| + return builder; |
|
tommycli
2017/07/05 19:46:23
I think you can just return it directly like here:
amberwon
2017/07/05 19:54:02
Done.
|
| +} |
| + |
| +void PDFPluginPlaceholder::DownloadPDFCallback() { |
| + // TODO(amberwon): Download PDF. |
|
tommycli
2017/07/05 19:46:23
TODO(amberwon): Implement starting PDF download.
amberwon
2017/07/05 19:54:02
Done.
|
| +} |