| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef COMPONENTS_PLUGINS_RENDERER_LOADABLE_PLUGIN_PLACEHOLDER_H_ | 5 #ifndef COMPONENTS_PLUGINS_RENDERER_LOADABLE_PLUGIN_PLACEHOLDER_H_ |
| 6 #define COMPONENTS_PLUGINS_RENDERER_LOADABLE_PLUGIN_PLACEHOLDER_H_ | 6 #define COMPONENTS_PLUGINS_RENDERER_LOADABLE_PLUGIN_PLACEHOLDER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 // Defer loading of plugin, and instead show the Power Saver poster image. | 42 // Defer loading of plugin, and instead show the Power Saver poster image. |
| 43 void BlockForPowerSaverPoster(); | 43 void BlockForPowerSaverPoster(); |
| 44 | 44 |
| 45 // When we load the plugin, use this already-created plugin, not a new one. | 45 // When we load the plugin, use this already-created plugin, not a new one. |
| 46 void SetPremadePlugin(content::PluginInstanceThrottler* throttler); | 46 void SetPremadePlugin(content::PluginInstanceThrottler* throttler); |
| 47 | 47 |
| 48 void AllowLoading() { allow_loading_ = true; } | 48 void AllowLoading() { allow_loading_ = true; } |
| 49 | 49 |
| 50 protected: | 50 protected: |
| 51 LoadablePluginPlaceholder(content::RenderFrame* render_frame, | 51 LoadablePluginPlaceholder(content::RenderFrame* render_frame, |
| 52 blink::WebLocalFrame* frame, | |
| 53 const blink::WebPluginParams& params, | 52 const blink::WebPluginParams& params, |
| 54 const std::string& html_data); | 53 const std::string& html_data); |
| 55 | |
| 56 ~LoadablePluginPlaceholder() override; | 54 ~LoadablePluginPlaceholder() override; |
| 57 | 55 |
| 58 void MarkPluginEssential( | 56 void MarkPluginEssential( |
| 59 content::PluginInstanceThrottler::PowerSaverUnthrottleMethod method); | 57 content::PluginInstanceThrottler::PowerSaverUnthrottleMethod method); |
| 60 | 58 |
| 61 void OnLoadBlockedPlugins(const std::string& identifier); | 59 void OnLoadBlockedPlugins(const std::string& identifier); |
| 62 void OnSetIsPrerendering(bool is_prerendering); | 60 void OnSetIsPrerendering(bool is_prerendering); |
| 63 | 61 |
| 64 void SetMessage(const base::string16& message); | 62 void SetMessage(const base::string16& message); |
| 65 void SetPluginInfo(const content::WebPluginInfo& plugin_info); | 63 void SetPluginInfo(const content::WebPluginInfo& plugin_info); |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 gfx::Rect unobscured_rect_; | 138 gfx::Rect unobscured_rect_; |
| 141 | 139 |
| 142 base::WeakPtrFactory<LoadablePluginPlaceholder> weak_factory_; | 140 base::WeakPtrFactory<LoadablePluginPlaceholder> weak_factory_; |
| 143 | 141 |
| 144 DISALLOW_COPY_AND_ASSIGN(LoadablePluginPlaceholder); | 142 DISALLOW_COPY_AND_ASSIGN(LoadablePluginPlaceholder); |
| 145 }; | 143 }; |
| 146 | 144 |
| 147 } // namespace plugins | 145 } // namespace plugins |
| 148 | 146 |
| 149 #endif // COMPONENTS_PLUGINS_RENDERER_LOADABLE_PLUGIN_PLACEHOLDER_H_ | 147 #endif // COMPONENTS_PLUGINS_RENDERER_LOADABLE_PLUGIN_PLACEHOLDER_H_ |
| OLD | NEW |