OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_PLUGIN_PLACEHOLDER_H_ | 5 #ifndef COMPONENTS_PLUGINS_RENDERER_PLUGIN_PLACEHOLDER_H_ |
6 #define COMPONENTS_PLUGINS_RENDERER_PLUGIN_PLACEHOLDER_H_ | 6 #define COMPONENTS_PLUGINS_RENDERER_PLUGIN_PLACEHOLDER_H_ |
7 | 7 |
8 #include "components/plugins/renderer/webview_plugin.h" | 8 #include "components/plugins/renderer/webview_plugin.h" |
9 #include "content/public/common/webplugininfo.h" | 9 #include "content/public/common/webplugininfo.h" |
10 #include "content/public/renderer/context_menu_client.h" | 10 #include "content/public/renderer/context_menu_client.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 blink::WebFrame* frame, | 42 blink::WebFrame* frame, |
43 const blink::WebPluginParams& params, | 43 const blink::WebPluginParams& params, |
44 const std::string& html_data, | 44 const std::string& html_data, |
45 GURL placeholderDataUrl); | 45 GURL placeholderDataUrl); |
46 | 46 |
47 virtual ~PluginPlaceholder(); | 47 virtual ~PluginPlaceholder(); |
48 | 48 |
49 void OnLoadBlockedPlugins(const std::string& identifier); | 49 void OnLoadBlockedPlugins(const std::string& identifier); |
50 void OnSetIsPrerendering(bool is_prerendering); | 50 void OnSetIsPrerendering(bool is_prerendering); |
51 | 51 |
52 void SetMessage(const string16& message); | 52 void SetMessage(const base::string16& message); |
53 void SetPluginInfo(const content::WebPluginInfo& plugin_info); | 53 void SetPluginInfo(const content::WebPluginInfo& plugin_info); |
54 const content::WebPluginInfo& GetPluginInfo() const; | 54 const content::WebPluginInfo& GetPluginInfo() const; |
55 void SetIdentifier(const std::string& identifier); | 55 void SetIdentifier(const std::string& identifier); |
56 content::RenderFrame* GetRenderFrame(); | 56 content::RenderFrame* GetRenderFrame(); |
57 blink::WebFrame* GetFrame(); | 57 blink::WebFrame* GetFrame(); |
58 const blink::WebPluginParams& GetPluginParams() const; | 58 const blink::WebPluginParams& GetPluginParams() const; |
59 bool LoadingAllowed() const { return allow_loading_; } | 59 bool LoadingAllowed() const { return allow_loading_; } |
60 | 60 |
61 // Replace this placeholder with a different plugin (which could be | 61 // Replace this placeholder with a different plugin (which could be |
62 // a placeholder again). | 62 // a placeholder again). |
(...skipping 30 matching lines...) Expand all Loading... |
93 | 93 |
94 void UpdateMessage(); | 94 void UpdateMessage(); |
95 | 95 |
96 content::RenderFrame* render_frame_; | 96 content::RenderFrame* render_frame_; |
97 blink::WebFrame* frame_; | 97 blink::WebFrame* frame_; |
98 blink::WebPluginParams plugin_params_; | 98 blink::WebPluginParams plugin_params_; |
99 WebViewPlugin* plugin_; | 99 WebViewPlugin* plugin_; |
100 | 100 |
101 content::WebPluginInfo plugin_info_; | 101 content::WebPluginInfo plugin_info_; |
102 | 102 |
103 string16 message_; | 103 base::string16 message_; |
104 | 104 |
105 // True iff the plugin was blocked because the page was being prerendered. | 105 // True iff the plugin was blocked because the page was being prerendered. |
106 // Plugin will automatically be loaded when the page is displayed. | 106 // Plugin will automatically be loaded when the page is displayed. |
107 bool is_blocked_for_prerendering_; | 107 bool is_blocked_for_prerendering_; |
108 bool allow_loading_; | 108 bool allow_loading_; |
109 | 109 |
110 bool hidden_; | 110 bool hidden_; |
111 bool finished_loading_; | 111 bool finished_loading_; |
112 std::string identifier_; | 112 std::string identifier_; |
113 | 113 |
114 DISALLOW_COPY_AND_ASSIGN(PluginPlaceholder); | 114 DISALLOW_COPY_AND_ASSIGN(PluginPlaceholder); |
115 }; | 115 }; |
116 | 116 |
117 } // namespace plugins | 117 } // namespace plugins |
118 | 118 |
119 #endif // COMPONENTS_PLUGINS_RENDERER_PLUGIN_PLACEHOLDER_H_ | 119 #endif // COMPONENTS_PLUGINS_RENDERER_PLUGIN_PLACEHOLDER_H_ |
OLD | NEW |