Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1291)

Side by Side Diff: components/plugins/renderer/loadable_plugin_placeholder.h

Issue 2733083004: Emit error events if the loading of an object element failed (Closed)
Patch Set: Emit error events if the loading of an object element failed Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 27 matching lines...) Expand all
38 void set_power_saver_enabled(bool power_saver_enabled) { 38 void set_power_saver_enabled(bool power_saver_enabled) {
39 power_saver_enabled_ = power_saver_enabled; 39 power_saver_enabled_ = power_saver_enabled;
40 } 40 }
41 41
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() {
49 plugin()->unmarkAsErrorPlaceholder();
50 allow_loading_ = true;
51 }
49 52
50 protected: 53 protected:
51 LoadablePluginPlaceholder(content::RenderFrame* render_frame, 54 LoadablePluginPlaceholder(content::RenderFrame* render_frame,
52 blink::WebLocalFrame* frame, 55 blink::WebLocalFrame* frame,
53 const blink::WebPluginParams& params, 56 const blink::WebPluginParams& params,
54 const std::string& html_data); 57 const std::string& html_data);
55 58
56 ~LoadablePluginPlaceholder() override; 59 ~LoadablePluginPlaceholder() override;
57 60
58 void MarkPluginEssential( 61 void MarkPluginEssential(
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 gfx::Rect unobscured_rect_; 142 gfx::Rect unobscured_rect_;
140 143
141 base::WeakPtrFactory<LoadablePluginPlaceholder> weak_factory_; 144 base::WeakPtrFactory<LoadablePluginPlaceholder> weak_factory_;
142 145
143 DISALLOW_COPY_AND_ASSIGN(LoadablePluginPlaceholder); 146 DISALLOW_COPY_AND_ASSIGN(LoadablePluginPlaceholder);
144 }; 147 };
145 148
146 } // namespace plugins 149 } // namespace plugins
147 150
148 #endif // COMPONENTS_PLUGINS_RENDERER_LOADABLE_PLUGIN_PLACEHOLDER_H_ 151 #endif // COMPONENTS_PLUGINS_RENDERER_LOADABLE_PLUGIN_PLACEHOLDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698