| 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
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..0fd1e9754a0e08a96e5714604b4459267b3d5264
|
| --- /dev/null
|
| +++ b/chrome/renderer/plugins/pdf_plugin_placeholder.cc
|
| @@ -0,0 +1,32 @@
|
| +// Copyright 2017 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "chrome/renderer/plugins/pdf_plugin_placeholder.h"
|
| +
|
| +#include "ui/base/resource/resource_bundle.h"
|
| +#include "ui/base/webui/jstemplate_builder.h"
|
| +
|
| +gin::WrapperInfo PDFPluginPlaceholder::kWrapperInfo = {gin::kEmbedderNativeGin};
|
| +
|
| +PDFPluginPlaceholder::PDFPluginPlaceholder(content::RenderFrame* render_frame,
|
| + const blink::WebPluginParams& params,
|
| + const std::string& html_data)
|
| + : plugins::PluginPlaceholderBase(render_frame, params, html_data) {}
|
| +
|
| +PDFPluginPlaceholder::~PDFPluginPlaceholder() {}
|
| +
|
| +PDFPluginPlaceholder* PDFPluginPlaceholder::CreateBlockedPlugin(
|
| + content::RenderFrame* render_frame,
|
| + const blink::WebPluginParams& params,
|
| + int template_id) {
|
| + const base::StringPiece template_html(
|
| + ResourceBundle::GetSharedInstance().GetRawDataResource(template_id));
|
| + base::DictionaryValue values;
|
| + std::string html_data = webui::GetI18nTemplateHtml(template_html, &values);
|
| + return new PDFPluginPlaceholder(render_frame, params, html_data);
|
| +}
|
| +
|
| +v8::Local<v8::Value> PDFPluginPlaceholder::GetV8Handle(v8::Isolate* isolate) {
|
| + return gin::CreateHandle(isolate, this).ToV8();
|
| +}
|
|
|