[M47_2526] Chromium upversion to m47_2526 branch
[platform/framework/web/chromium-efl.git] / tizen_src / ewk / efl_integration / renderer / plugins / plugin_placeholder_efl.cc
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.
4
5 #include "renderer/plugins/plugin_placeholder_efl.h"
6
7 #include <libintl.h>
8
9 #include "gin/handle.h"
10 #include "third_party/WebKit/public/web/WebKit.h"
11
12 namespace {
13
14 // The placeholder is loaded in normal web renderer processes
15 static std::string
16     kPluginPlaceholderDataURL("data:text/html,pluginplaceholderdata");
17
18 static std::string kPluginMissingMessage(
19     dgettext("WebKit", "IDS_WEBVIEW_BODY_PLUG_IN_MISSING"));
20
21 }  // namespace
22
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) {
30 }
31
32 PluginPlaceholderEfl::~PluginPlaceholderEfl() {
33 }
34
35 // static
36 PluginPlaceholderEfl* PluginPlaceholderEfl::CreateMissingPlugin(
37     content::RenderFrame* render_frame,
38     blink::WebLocalFrame* frame,
39     const blink::WebPluginParams& params) {
40
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;
46 }
47
48 blink::WebPlugin* PluginPlaceholderEfl::CreatePlugin() {
49 }
50
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
55 #endif
56 }