OLD | NEW |
(Empty) | |
| 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. |
| 4 |
| 5 #ifndef CHROME_RENDERER_PLUGINS_SHADOW_DOM_PLUGIN_PLACEHOLDER_H_ |
| 6 #define CHROME_RENDERER_PLUGINS_SHADOW_DOM_PLUGIN_PLACEHOLDER_H_ |
| 7 |
| 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "third_party/WebKit/public/web/WebPluginPlaceholder.h" |
| 10 |
| 11 namespace blink { |
| 12 class WebLocalFrame; |
| 13 struct WebPluginParams; |
| 14 } |
| 15 |
| 16 namespace content { |
| 17 class RenderFrame; |
| 18 } |
| 19 |
| 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. |
| 23 |
| 24 // Returns |true| if shadow DOM plugin placeholders are enabled. |
| 25 bool ShadowDOMPluginPlaceholderEnabled(); |
| 26 |
| 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); |
| 34 |
| 35 // Creates a placeholder suitable for representing a missing plugin. |
| 36 scoped_ptr<blink::WebPluginPlaceholder> |
| 37 CreateShadowDOMPlaceholderForMissingPlugin(); |
| 38 |
| 39 #endif // CHROME_RENDERER_PLUGINS_SHADOW_DOM_PLUGIN_PLACEHOLDER_H_ |
OLD | NEW |