1 // Copyright 2016 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 #ifndef EWK_EFL_INTEGRATION_RENDERER_PLUGINS_PLUGIN_PLACEHOLDER_AVPLAYER_H_
6 #define EWK_EFL_INTEGRATION_RENDERER_PLUGINS_PLUGIN_PLACEHOLDER_AVPLAYER_H_
10 #include "base/macros.h"
11 #include "base/memory/weak_ptr.h"
12 #include "components/plugins/renderer/plugin_placeholder.h"
13 #include "ui/gfx/geometry/rect.h"
19 class PluginPlaceholderAvplayer
20 : public plugins::PluginPlaceholderBase,
21 public gin::Wrappable<PluginPlaceholderAvplayer> {
23 static gin::WrapperInfo kWrapperInfo;
25 static bool SupportsMimeType(const std::string& mimetype);
27 static PluginPlaceholderAvplayer* Create(
28 content::RenderFrame* render_frame,
29 blink::WebLocalFrame* frame,
30 const blink::WebPluginParams& params);
33 PluginPlaceholderAvplayer(content::RenderFrame* render_frame,
34 blink::WebLocalFrame* frame,
35 const blink::WebPluginParams& params);
36 ~PluginPlaceholderAvplayer() override;
38 // WebViewPlugin::Delegate method.
39 v8::Local<v8::Value> GetV8Handle(v8::Isolate*) override;
40 void OnUnobscuredRectUpdate(const gfx::Rect& unobscured_rect) override;
41 void NotifyTransparentChanged();
43 std::unique_ptr<cc_blink::WebLayerImpl> web_layer_;
44 gfx::Rect local_rect_;
46 DISALLOW_COPY_AND_ASSIGN(PluginPlaceholderAvplayer);
49 #endif // EWK_EFL_INTEGRATION_RENDERER_PLUGINS_PLUGIN_PLACEHOLDER_AVPLAYER_H_