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 // 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 to download an embedded PDF when the | |
| 13 // PDF plugin is disabled or unavailable. | |
| 14 class PDFPluginPlaceholder : public plugins::PluginPlaceholderBase, | |
| 15 public gin::Wrappable<PDFPluginPlaceholder> { | |
| 16 public: | |
| 17 static gin::WrapperInfo kWrapperInfo; | |
| 18 | |
| 19 // Returned pointer is owned by plugin, which can be returned by the member | |
|
Lei Zhang
2017/06/30 22:45:11
Nobody actually owns the pointer. It's the object
amberwon
2017/06/30 23:11:12
Done.
| |
| 20 // function plugin(). | |
|
Lei Zhang
2017/06/30 22:45:11
Except I don't see a plugin() function in this fil
amberwon
2017/06/30 23:11:12
Done.
| |
| 21 static PDFPluginPlaceholder* CreatePDFPlaceholder( | |
| 22 content::RenderFrame* render_frame, | |
| 23 const blink::WebPluginParams& params); | |
| 24 | |
| 25 private: | |
| 26 PDFPluginPlaceholder(content::RenderFrame* render_frame, | |
| 27 const blink::WebPluginParams& params, | |
| 28 const std::string& html_data); | |
| 29 ~PDFPluginPlaceholder() override; | |
| 30 | |
| 31 // WebViewPlugin::Delegate methods: | |
| 32 v8::Local<v8::Value> GetV8Handle(v8::Isolate* isolate) override; | |
| 33 }; | |
| 34 | |
| 35 #endif // CHROME_RENDERER_PLUGINS_PDF_PLUGIN_PLACEHOLDER_H_ | |
| OLD | NEW |