Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_RENDERER_PLUGINS_PDF_PLUGIN_PLACEHOLDER_H_ | |
| 6 #define CHROME_RENDERER_PLUGINS_PDF_PLUGIN_PLACEHOLDER_H_ | |
| 7 | |
| 8 #include "components/plugins/renderer/plugin_placeholder.h" | |
| 9 | |
| 10 // Creates a placeholder that allows users to click to download a PDF for when | |
| 11 // plugins are disabled and the PDF fails to load. | |
| 12 // TODO(amberwon): Flesh out the class more. | |
|
tommycli
2017/06/30 15:31:18
"...to download an embedded PDF when the PDF plugi
amberwon
2017/06/30 17:35:54
Done.
| |
| 13 class PDFPluginPlaceholder final : public plugins::PluginPlaceholderBase, | |
| 14 public gin::Wrappable<PDFPluginPlaceholder> { | |
| 15 public: | |
| 16 static gin::WrapperInfo kWrapperInfo; | |
| 17 | |
| 18 static PDFPluginPlaceholder* CreatePDFPlaceholder( | |
| 19 content::RenderFrame* render_frame, | |
| 20 const blink::WebPluginParams& params); | |
| 21 | |
| 22 private: | |
| 23 PDFPluginPlaceholder(content::RenderFrame* render_frame, | |
| 24 const blink::WebPluginParams& params, | |
| 25 const std::string& html_data); | |
| 26 ~PDFPluginPlaceholder() override; | |
| 27 | |
| 28 // WebViewPlugin::Delegate methods: | |
| 29 v8::Local<v8::Value> GetV8Handle(v8::Isolate* isolate) final; | |
| 30 }; | |
| 31 | |
| 32 #endif // CHROME_RENDERER_PLUGINS_PDF_PLUGIN_PLACEHOLDER_H_ | |
| OLD | NEW |