| 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 CHROME_RENDERER_PLUGINS_CHROME_PLUGIN_PLACEHOLDER_H_ | 5 #ifndef CHROME_RENDERER_PLUGINS_CHROME_PLUGIN_PLACEHOLDER_H_ |
| 6 #define CHROME_RENDERER_PLUGINS_CHROME_PLUGIN_PLACEHOLDER_H_ | 6 #define CHROME_RENDERER_PLUGINS_CHROME_PLUGIN_PLACEHOLDER_H_ |
| 7 | 7 |
| 8 #include "components/plugins/renderer/loadable_plugin_placeholder.h" | 8 #include "components/plugins/renderer/loadable_plugin_placeholder.h" |
| 9 #include "content/public/renderer/context_menu_client.h" | 9 #include "content/public/renderer/context_menu_client.h" |
| 10 #include "content/public/renderer/render_process_observer.h" | 10 #include "content/public/renderer/render_process_observer.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 GURL base_url; | 25 GURL base_url; |
| 26 | 26 |
| 27 // Specify this to provide partially obscured plugins a centered poster image. | 27 // Specify this to provide partially obscured plugins a centered poster image. |
| 28 gfx::Size custom_poster_size; | 28 gfx::Size custom_poster_size; |
| 29 }; | 29 }; |
| 30 | 30 |
| 31 class ChromePluginPlaceholder : public plugins::LoadablePluginPlaceholder, | 31 class ChromePluginPlaceholder : public plugins::LoadablePluginPlaceholder, |
| 32 public content::RenderProcessObserver, | 32 public content::RenderProcessObserver, |
| 33 public content::ContextMenuClient { | 33 public content::ContextMenuClient { |
| 34 public: | 34 public: |
| 35 static const char kPluginPlaceholderDataURL[]; | |
| 36 | |
| 37 static ChromePluginPlaceholder* CreateBlockedPlugin( | 35 static ChromePluginPlaceholder* CreateBlockedPlugin( |
| 38 content::RenderFrame* render_frame, | 36 content::RenderFrame* render_frame, |
| 39 blink::WebLocalFrame* frame, | 37 blink::WebLocalFrame* frame, |
| 40 const blink::WebPluginParams& params, | 38 const blink::WebPluginParams& params, |
| 41 const content::WebPluginInfo& info, | 39 const content::WebPluginInfo& info, |
| 42 const std::string& identifier, | 40 const std::string& identifier, |
| 43 const base::string16& name, | 41 const base::string16& name, |
| 44 int resource_id, | 42 int resource_id, |
| 45 const base::string16& message, | 43 const base::string16& message, |
| 46 const PlaceholderPosterInfo& poster_info); | 44 const PlaceholderPosterInfo& poster_info); |
| 47 | 45 |
| 48 // Creates a new WebViewPlugin with a MissingPlugin as a delegate. | 46 // Creates a new WebViewPlugin with a MissingPlugin as a delegate. |
| 49 static ChromePluginPlaceholder* CreateMissingPlugin( | 47 static ChromePluginPlaceholder* CreateLoadableMissingPlugin( |
| 50 content::RenderFrame* render_frame, | 48 content::RenderFrame* render_frame, |
| 51 blink::WebLocalFrame* frame, | 49 blink::WebLocalFrame* frame, |
| 52 const blink::WebPluginParams& params); | 50 const blink::WebPluginParams& params); |
| 53 | 51 |
| 54 static ChromePluginPlaceholder* CreateErrorPlugin( | |
| 55 content::RenderFrame* render_frame, | |
| 56 const base::FilePath& plugin_path); | |
| 57 | |
| 58 void SetStatus(ChromeViewHostMsg_GetPluginInfo_Status status); | 52 void SetStatus(ChromeViewHostMsg_GetPluginInfo_Status status); |
| 59 | 53 |
| 60 #if defined(ENABLE_PLUGIN_INSTALLATION) | 54 #if defined(ENABLE_PLUGIN_INSTALLATION) |
| 61 int32 CreateRoutingId(); | 55 int32 CreateRoutingId(); |
| 62 #endif | 56 #endif |
| 63 | 57 |
| 64 private: | 58 private: |
| 65 ChromePluginPlaceholder(content::RenderFrame* render_frame, | 59 ChromePluginPlaceholder(content::RenderFrame* render_frame, |
| 66 blink::WebLocalFrame* frame, | 60 blink::WebLocalFrame* frame, |
| 67 const blink::WebPluginParams& params, | 61 const blink::WebPluginParams& params, |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 #endif | 108 #endif |
| 115 | 109 |
| 116 bool has_host_; | 110 bool has_host_; |
| 117 int context_menu_request_id_; // Nonzero when request pending. | 111 int context_menu_request_id_; // Nonzero when request pending. |
| 118 base::string16 plugin_name_; | 112 base::string16 plugin_name_; |
| 119 | 113 |
| 120 DISALLOW_COPY_AND_ASSIGN(ChromePluginPlaceholder); | 114 DISALLOW_COPY_AND_ASSIGN(ChromePluginPlaceholder); |
| 121 }; | 115 }; |
| 122 | 116 |
| 123 #endif // CHROME_RENDERER_PLUGINS_CHROME_PLUGIN_PLACEHOLDER_H_ | 117 #endif // CHROME_RENDERER_PLUGINS_CHROME_PLUGIN_PLACEHOLDER_H_ |
| OLD | NEW |