1 // Copyright 2014 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.
5 #ifndef CHROME_RENDERER_PLUGINS_SHADOW_DOM_PLUGIN_PLACEHOLDER_H_
6 #define CHROME_RENDERER_PLUGINS_SHADOW_DOM_PLUGIN_PLACEHOLDER_H_
8 #include "base/memory/scoped_ptr.h"
9 #include "third_party/WebKit/public/web/WebPluginPlaceholder.h"
13 struct WebPluginParams
;
20 // This is the Chrome implementation of shadow DOM plugin placeholders,
21 // intended to ultimately replace those based on WebViewPlugin.
22 // It is guarded by the --enable-plugin-placeholder-shadow-dom switch.
24 // Returns |true| if shadow DOM plugin placeholders are enabled.
25 bool ShadowDOMPluginPlaceholderEnabled();
27 // Possibly creates a placeholder given plugin info output.
28 // Returns nullptr if it is not appropriate to create a placeholder
29 // (for instance, because the plugin should be allowed to load).
30 scoped_ptr
<blink::WebPluginPlaceholder
> CreateShadowDOMPlaceholderForPluginInfo(
31 content::RenderFrame
* render_frame
,
32 blink::WebLocalFrame
* frame
,
33 const blink::WebPluginParams
& orig_params
);
35 // Creates a placeholder suitable for representing a missing plugin.
36 scoped_ptr
<blink::WebPluginPlaceholder
>
37 CreateShadowDOMPlaceholderForMissingPlugin();
39 #endif // CHROME_RENDERER_PLUGINS_SHADOW_DOM_PLUGIN_PLACEHOLDER_H_