1 // Copyright 2015 Samsung Electronics. 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.
5 #include "renderer/plugins/plugin_placeholder_efl.h"
9 #include "gin/handle.h"
10 #include "third_party/WebKit/public/web/WebKit.h"
14 // The placeholder is loaded in normal web renderer processes
16 kPluginPlaceholderDataURL("data:text/html,pluginplaceholderdata");
18 static std::string kPluginMissingMessage(
19 dgettext("WebKit", "IDS_WEBVIEW_BODY_PLUG_IN_MISSING"));
23 PluginPlaceholderEfl::PluginPlaceholderEfl(
24 content::RenderFrame* render_frame,
25 blink::WebLocalFrame* frame,
26 const blink::WebPluginParams& params,
27 const std::string& html_data)
28 : plugins::LoadablePluginPlaceholder(
29 render_frame, frame, params, html_data) {
32 PluginPlaceholderEfl::~PluginPlaceholderEfl() {
36 PluginPlaceholderEfl* PluginPlaceholderEfl::CreateMissingPlugin(
37 content::RenderFrame* render_frame,
38 blink::WebLocalFrame* frame,
39 const blink::WebPluginParams& params) {
41 // |missing_plugin| will destroy itself when its WebViewPlugin is going away.
42 PluginPlaceholderEfl* missing_plugin = new PluginPlaceholderEfl(
43 render_frame, frame, params, kPluginMissingMessage);
44 missing_plugin->AllowLoading();
45 return missing_plugin;
48 blink::WebPlugin* PluginPlaceholderEfl::CreatePlugin() {
51 v8::Local<v8::Value> PluginPlaceholderEfl::GetV8Handle(v8::Isolate* isolate) {
52 #if !defined(EWK_BRINGUP)
53 // [M47_2526] Need to implement this API
54 // FIXME: http://web.sec.samsung.net/bugzilla/show_bug.cgi?id=14516